-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
📊 Preview mermaid
charts 🧜♀️
#673
Comments
I'm working on a markedjs web component here (still WIP -- need to add code highlighting): #667. This component renders the nested list without requiring four spaces. Looks like there is a way to use mermaid with markedjs: https://mermaid.js.org/config/usage.html#example-of-a-marked-renderer So you could copy that web component and modify it to include mermaid. Then you can copy mel.chat (if you haven't already) and modify it to use the markedjs web component instead of me.markdown. I haven't tested out the performance of the markedjs web component yet (and what else it's missing). But I think it's definitely possible to support mermaid (mermaid is great!). Markedjs also has some in progress support for Github flavored markdown, but it does not look like it's ready yet: markedjs/marked#1202 |
For the example markdown web component (#667), I added mermaidjs support. Example: |
Yup, the output and components are really good, but the problem is that I can't predict le LLM output 😅 |
I see, so the LLM output isn't just markdown? I was assuming the LLM just outputted markdown only (in that case you can just render it using the markdown web component). It's trickier if the format is not markdown. But if you could get your LLM to output markdown, then that would probably be easiest. |
Hmmm, it is, but it embeds mermaidjs blocks as part of the markdown. So you mean that we should maybe try so always send |
👌 @richard-to , we'll try so output in the target mesop ... or maybe should be force the agent output to always answer in markdown... what's your opinion about that ?.. I mean... without having o deal with complex OutputParsers ? |
Yes, I think you should just always render the output in markdown if possible. That would likely be the easiest option. Granted I don't know what other use cases you have. For example if you have images being generated, you wouldn't be able to render the images with the markdown component (would need to use the image component) But you could also ask the LLM to render output with some XML tags (using XML tags like this seems to be what Claude does a lot with their agents). So you could have something like
Then you can parse XML blocks for the given types. Then you could use the appropriate mesop component based off of that. |
❔ About
We use
mesop
as a front-end to our agent.... and we are bg fans of GitHub markdown flavour, for issues... and for documentation :One of the most appreciated GitHub benefits is to live preview
mermaid
charts :👉 Actually, we have to copy/paste the output markdown into a GH issue to get the full enduser experience.
💡 Feature request
The aim of this issue would to know if
mesop
could do the job for us, I mean to :markdown
mermaid
code block, render it inlineThe text was updated successfully, but these errors were encountered: