File tree 1 file changed +30
-0
lines changed
core-jdk8/src/main/java/org/bsc/langgraph4j
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -308,4 +308,34 @@ public CompiledGraph<State> compile() throws GraphStateException {
308
308
return compile (CompileConfig .builder ().build ());
309
309
}
310
310
311
+ /**
312
+ * Generates a drawable graph representation of the state graph.
313
+ *
314
+ * @param type the type of graph representation to generate
315
+ * @param title the title of the graph
316
+ * @param printConditionalEdges whether to print conditional edges
317
+ * @return a diagram code of the state graph
318
+ */
319
+ public GraphRepresentation getGraph ( GraphRepresentation .Type type , String title , boolean printConditionalEdges ) {
320
+
321
+ String content = type .generator .generate ( this , title , printConditionalEdges );
322
+
323
+ return new GraphRepresentation ( type , content );
324
+ }
325
+
326
+ /**
327
+ * Generates a drawable graph representation of the state graph.
328
+ *
329
+ * @param type the type of graph representation to generate
330
+ * @param title the title of the graph
331
+ * @return a diagram code of the state graph
332
+ */
333
+ public GraphRepresentation getGraph ( GraphRepresentation .Type type , String title ) {
334
+
335
+ String content = type .generator .generate ( this , title , true );
336
+
337
+ return new GraphRepresentation ( type , content );
338
+ }
339
+
340
+
311
341
}
You can’t perform that action at this time.
0 commit comments