Git Product home page Git Product logo

Comments (4)

richard-to avatar richard-to commented on July 28, 2024

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

from mesop.

richard-to avatar richard-to commented on July 28, 2024

For the example markdown web component (#667), I added mermaidjs support.

Example:

Screenshot 2024-07-26 at 5 02 12 PM

from mesop.

adriens avatar adriens commented on July 28, 2024

Yup, the output and components are really good, but the problem is that I can't predict le LLM output 😅
... so the pattern would to parse the LLM ouput and decide how to inject it into mesop ?

from mesop.

richard-to avatar richard-to commented on July 28, 2024

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.

from mesop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.