Skip to content

Commit

Permalink
fix: mermaid generation
Browse files Browse the repository at this point in the history
START, END issue

work on #24
  • Loading branch information
bsorrentino committed Sep 9, 2024
1 parent ee26478 commit 53b68e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected void appendHeader(StringBuilder sb, String title) {
sb
.append( format("---\ntitle: %s\n---\n", title))
.append( "flowchart TD\n")
.append( "\tstart((start))\n")
.append( "\t__START__((start))\n")
.append( "\t__END__((stop))\n")
;
}
Expand Down Expand Up @@ -48,17 +48,17 @@ protected StringBuilder commentLine(StringBuilder sb, boolean yesOrNo) {

@Override
protected void start(StringBuilder sb, String entryPoint) {
call( sb, "start", entryPoint );
call( sb, "__START__", entryPoint );
}

@Override
protected void finish(StringBuilder sb, String finishPoint) {
call( sb, finishPoint, "stop" );
call( sb, finishPoint, "__END__" );
}

@Override
protected void finish(StringBuilder sb, String finishPoint, String description) {
call( sb, finishPoint, "stop", description );
call( sb, finishPoint, "__END__", description );
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions core-jdk8/src/test/java/org/bsc/langgraph4j/GraphTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,14 @@ public void GenerateImageToDiagramGraph() throws Exception {
"title: Graph Diagram\n" +
"---\n" +
"flowchart TD\n" +
"\tstart((start))\n" +
"\t__START__((start))\n" +
"\t__END__((stop))\n" +
"\tagent_describer(\"agent_describer\")\n" +
"\tagent_sequence_plantuml(\"agent_sequence_plantuml\")\n" +
"\tagent_generic_plantuml(\"agent_generic_plantuml\")\n" +
"\tevaluate_result(\"evaluate_result\")\n" +
"\t%%\tcondition1{\"check state\"}\n" +
"\tstart:::start --> agent_describer:::agent_describer\n" +
"\t__START__:::__START__ --> agent_describer:::agent_describer\n" +
"\t%%\tagent_describer:::agent_describer --> condition1:::condition1\n" +
"\t%%\tcondition1:::condition1 -->|sequence| agent_sequence_plantuml:::agent_sequence_plantuml\n" +
"\tagent_describer:::agent_describer -->|sequence| agent_sequence_plantuml:::agent_sequence_plantuml\n" +
Expand Down

0 comments on commit 53b68e0

Please sign in to comment.