Skip to content

Commit

Permalink
test: reset steps counter after ending graph
Browse files Browse the repository at this point in the history
work on #9
  • Loading branch information
bsorrentino committed Jul 17, 2024
1 parent 17e5750 commit acf32a7
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public static void main(String[] args) throws Exception {
@Override
public String apply(AgentState state) {
if( ++steps == 2 ) {
steps = 0;
return "end";
}
return "a2";
Expand All @@ -54,6 +55,7 @@ public String apply(AgentState state) {

LangGraphStreamingServer server = LangGraphStreamingServer.builder()
.port(8080)
.title("LANGGRAPH4j - TEST")
.addInputStringArg("input")
.build(app);

Expand Down

0 comments on commit acf32a7

Please sign in to comment.