Package org.bsc.langgraph4j.diagram
Class MermaidGenerator
java.lang.Object
org.bsc.langgraph4j.DiagramGenerator
org.bsc.langgraph4j.diagram.MermaidGenerator
This class represents a MermaidGenerator that extends DiagramGenerator. It generates a flowchart using Mermaid syntax.
The flowchart includes various nodes such as start, stop, web_search, retrieve, grade_documents, generate, transform_query,
and different conditional states.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
appendHeader
(StringBuilder sb, String title) protected void
call
(StringBuilder sb, String from, String to) protected void
call
(StringBuilder sb, String from, String to, String description) protected StringBuilder
commentLine
(StringBuilder sb, boolean yesOrNo) protected void
declareConditionalEdge
(StringBuilder sb, int ordinal) protected void
declareConditionalStart
(StringBuilder sb, String name) protected void
declareNode
(StringBuilder sb, String name) protected void
finish
(StringBuilder sb, String finishPoint) protected void
finish
(StringBuilder sb, String finishPoint, String description) protected void
start
(StringBuilder sb, String entryPoint) Methods inherited from class org.bsc.langgraph4j.DiagramGenerator
generate
-
Constructor Details
-
MermaidGenerator
public MermaidGenerator()
-
-
Method Details
-
appendHeader
- Specified by:
appendHeader
in classDiagramGenerator
-
declareConditionalStart
- Specified by:
declareConditionalStart
in classDiagramGenerator
-
declareNode
- Specified by:
declareNode
in classDiagramGenerator
-
declareConditionalEdge
- Specified by:
declareConditionalEdge
in classDiagramGenerator
-
commentLine
- Specified by:
commentLine
in classDiagramGenerator
-
start
- Specified by:
start
in classDiagramGenerator
-
finish
- Specified by:
finish
in classDiagramGenerator
-
finish
- Specified by:
finish
in classDiagramGenerator
-
call
- Specified by:
call
in classDiagramGenerator
-
call
- Specified by:
call
in classDiagramGenerator
-