Class CallModelAction<State extends MessagesState<org.springframework.ai.chat.messages.Message>>
java.lang.Object
org.bsc.langgraph4j.spring.ai.agent.CallModelAction<State>
- All Implemented Interfaces:
BiFunction<State,,RunnableConfig, CompletableFuture<Map<String, Object>>> AsyncNodeActionWithConfig<State>
public class CallModelAction<State extends MessagesState<org.springframework.ai.chat.messages.Message>>
extends Object
implements AsyncNodeActionWithConfig<State>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(State state, RunnableConfig config) Calls a model with the given workflow state.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThen
-
Constructor Details
-
CallModelAction
-
-
Method Details
-
apply
Calls a model with the given workflow state.- Specified by:
applyin interfaceAsyncNodeActionWithConfig<State extends MessagesState<org.springframework.ai.chat.messages.Message>>- Specified by:
applyin interfaceBiFunction<State extends MessagesState<org.springframework.ai.chat.messages.Message>,RunnableConfig, CompletableFuture<Map<String, Object>>> - Parameters:
state- The current state containing input and intermediate steps.- Returns:
- A map containing the outcome of the agent call, either an action or a finish.
-