Skip to content

Commit

Permalink
refactor: rename method
Browse files Browse the repository at this point in the history
addConditionalEdge to addConditionalEdges
  • Loading branch information
bsorrentino committed Apr 26, 2024
1 parent d80fdc6 commit 4c196bf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions core-jdk8/src/main/java/org/bsc/langgraph4j/GraphState.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.bsc.langgraph4j;

import lombok.var;
import org.bsc.async.AsyncGenerator;
import org.bsc.async.AsyncGeneratorQueue;
import org.bsc.langgraph4j.action.AsyncEdgeAction;
import org.bsc.langgraph4j.action.AsyncNodeAction;
import org.bsc.langgraph4j.async.AsyncGenerator;
import org.bsc.langgraph4j.async.AsyncGeneratorQueue;
import org.bsc.langgraph4j.state.AgentState;
import org.bsc.langgraph4j.state.AgentStateFactory;
import org.bsc.langgraph4j.state.AppendableValue;
Expand Down Expand Up @@ -227,7 +227,7 @@ public void addEdge(String sourceId, String targetId) throws GraphStateException
edges.add( edge );
}

public void addConditionalEdge(String sourceId, AsyncEdgeAction<State> condition, Map<String,String> mappings ) throws GraphStateException {
public void addConditionalEdges(String sourceId, AsyncEdgeAction<State> condition, Map<String,String> mappings ) throws GraphStateException {
if( Objects.equals( sourceId, END)) {
throw Errors.invalidEdgeIdentifier.exception(END);
}
Expand Down
4 changes: 2 additions & 2 deletions core-jdk8/src/test/java/org/bsc/langgraph4j/AsyncTest.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.bsc.langgraph4j;

import lombok.var;
import org.bsc.langgraph4j.async.AsyncGenerator;
import org.bsc.langgraph4j.async.AsyncGeneratorQueue;
import org.bsc.async.AsyncGenerator;
import org.bsc.async.AsyncGeneratorQueue;
import org.junit.jupiter.api.Test;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void testValidation() throws Exception {
System.out.println(exception.getMessage());

exception = assertThrows(GraphStateException.class, () ->
workflow.addConditionalEdge("agent_1", edge_async( state -> "agent_3" ), mapOf() )
workflow.addConditionalEdges("agent_1", edge_async(state -> "agent_3" ), mapOf() )
);
System.out.println(exception.getMessage());

Expand Down

0 comments on commit 4c196bf

Please sign in to comment.