Open
Conversation
added 12 commits
October 6, 2024 15:15
|
How are you telling the model to return mermaid markup? |
Author
|
@DakotaWray2 I've two ways: first one is a custom function skill that when given a prompt returns me proper mermaid code. The other one is just to pass this in the prompt: `Convert the following architecture description (or existing mermaid code that you will modify or correct) ${architectureDescription} into precise and error-free Mermaid diagram code. Here are examples of diagrams that can be used, It works very well. |
|
Thanks @FreddyAyala this is nifty and I'm going to take a stab at it. Appreciate your insight and I'll follow-up if I have any input to your proposed implementation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new feature for rendering and downloading Mermaid diagrams within chat messages, along with some updates to dependencies. The most important changes include the addition of the
MermaidComponent, modifications to theMessageContentcomponent to support Mermaid diagrams, and updates to thepackage.jsonfor new dependencies and debugging support.New Feature: Mermaid Diagram Rendering
src/features/chat-page/mermaid-diagram.tsx: AddedMermaidComponentto render Mermaid diagrams and provide an option to download them as SVG files.src/features/chat-page/message-content.tsx: IntegratedMermaidComponentto detect and render Mermaid diagrams within chat messages. [1] [2] [3] [4]Dependency Updates
src/package.json: Addedmermaidlibrary and updated several Azure-related dependencies. Also, added a new script for debugging. [1] [2] [3]