mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown

Home Page:https://mermaid.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support a dialogue diagram

hanchchch opened this issue · comments

Proposal

The dialogue diagram would be useful to demonstrate a dialogue, especially for prototyping a chatbot. I mean, to keep up with the LLM trend !

Use Cases

The dialogue diagram could be used for demonstrating a LLM chatbot.

Screenshots

Screenshot 2024-04-12 at 4 22 39 PM

Syntax

dialogue
  role center cloud System
  role right User
  role left Assistant
  function left dotted find_joke

  System: You are a helpful assistant.
  User: Tell me a joke about mermaid.
  find_joke("mermaid") returns "Mermaid wore seashells to the math class"
  Assistant: `Why did the mermaid wear seashells to the math class?

  Because she wanted to improve her shell-fish abilities!`

Implementation

I will try and implement it myself.

Please go through #5367 (comment) and related discussions before writing the code, we are moving from Jison to Langium.