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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bsc.langgraph4j.DiagramGenerator
DiagramGenerator.Context
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
protected void
call
(DiagramGenerator.Context ctx, String from, String to) protected void
call
(DiagramGenerator.Context ctx, String from, String to, String description) protected void
commentLine
(DiagramGenerator.Context ctx, boolean yesOrNo) protected void
declareConditionalEdge
(DiagramGenerator.Context ctx, int ordinal) protected void
protected void
declareNode
(DiagramGenerator.Context ctx, String name) Methods inherited from class org.bsc.langgraph4j.DiagramGenerator
generate, generate
-
Field Details
-
SUBGRAPH_PREFIX
public static final char SUBGRAPH_PREFIX- See Also:
-
-
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
-
call
- Specified by:
call
in classDiagramGenerator
-
call
- Specified by:
call
in classDiagramGenerator
-