Class AgentFunctionCallbackWrapper<I,O>
java.lang.Object
org.bsc.spring.agentexecutor.function.AgentFunctionCallbackWrapper<I,O>
- All Implemented Interfaces:
BiFunction<I,
,org.springframework.ai.chat.model.ToolContext, O> org.springframework.ai.model.function.FunctionCallback
public class AgentFunctionCallbackWrapper<I,O>
extends Object
implements BiFunction<I,org.springframework.ai.chat.model.ToolContext,O>, org.springframework.ai.model.function.FunctionCallback
-
Nested Class Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
AgentFunctionCallbackWrapper
(String name, String description, String inputTypeSchema, Class<I> inputType, Function<O, String> responseConverter, com.fasterxml.jackson.databind.ObjectMapper objectMapper, BiFunction<I, org.springframework.ai.chat.model.ToolContext, O> function) -
Method Summary
Modifier and TypeMethodDescriptionstatic <I,
O> AgentFunctionCallbackWrapper.Builder<I, O> builder
(BiFunction<I, org.springframework.ai.chat.model.ToolContext, O> biFunction) static <I,
O> AgentFunctionCallbackWrapper.Builder<I, O> convertResponse
(org.springframework.ai.chat.messages.ToolResponseMessage.ToolResponse toolResponse) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiFunction
andThen
Methods inherited from interface org.springframework.ai.model.function.FunctionCallback
getDescription, getInputTypeSchema, getName
-
Constructor Details
-
AgentFunctionCallbackWrapper
-
-
Method Details
-
convertResponse
public O convertResponse(org.springframework.ai.chat.messages.ToolResponseMessage.ToolResponse toolResponse) -
call
- Specified by:
call
in interfaceorg.springframework.ai.model.function.FunctionCallback
-
call
- Specified by:
call
in interfaceorg.springframework.ai.model.function.FunctionCallback
-
apply
- Specified by:
apply
in interfaceBiFunction<I,
org.springframework.ai.chat.model.ToolContext, O>
-
builder
public static <I,O> AgentFunctionCallbackWrapper.Builder<I,O> builder(BiFunction<I, org.springframework.ai.chat.model.ToolContext, O> biFunction) -
builder
-