Class FunctionCallingHelper
java.lang.Object
org.springframework.ai.chat.model.AbstractToolCallSupport
org.springframework.ai.model.function.FunctionCallingHelper
Deprecated.
Helper class that reuses the
AbstractToolCallSupport
to implement the function
call handling logic on the client side. Used when the withProxyToolCalls(true) option
is enabled.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
Deprecated.Helper used to provide only the function definition, without the actual function call implementation. -
Field Summary
Fields inherited from class org.springframework.ai.chat.model.AbstractToolCallSupport
functionCallbackRegister, functionCallbackResolver, IS_RUNTIME_CALL
-
Constructor Summary
ConstructorDescriptionDeprecated.FunctionCallingHelper
(FunctionCallbackResolver functionCallbackResolver, FunctionCallingOptions functionCallingOptions, List<FunctionCallback> toolFunctionCallbacks) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionbuildToolCallConversation
(List<Message> previousMessages, AssistantMessage assistantMessage, ToolResponseMessage toolResponseMessage) Deprecated.handleToolCalls
(Prompt prompt, ChatResponse response) Deprecated.boolean
isToolCall
(ChatResponse chatResponse, Set<String> toolCallFinishReasons) Deprecated.processCall
(ChatModel chatModel, Prompt prompt, Set<String> finishReasons, Function<AssistantMessage.ToolCall, String> customFunction) Deprecated.reactor.core.publisher.Flux<ChatResponse>
processStream
(ChatModel chatModel, Prompt prompt, Set<String> finishReasons, Function<AssistantMessage.ToolCall, String> customFunction) Deprecated.Methods inherited from class org.springframework.ai.chat.model.AbstractToolCallSupport
executeFunctions, getFunctionCallbackRegister, isProxyToolCalls, isToolCall, resolveFunctionCallbacks, runtimeFunctionCallbackConfigurations
-
Constructor Details
-
FunctionCallingHelper
public FunctionCallingHelper()Deprecated. -
FunctionCallingHelper
public FunctionCallingHelper(FunctionCallbackResolver functionCallbackResolver, FunctionCallingOptions functionCallingOptions, List<FunctionCallback> toolFunctionCallbacks) Deprecated.
-
-
Method Details
-
isToolCall
Deprecated.- Overrides:
isToolCall
in classAbstractToolCallSupport
-
buildToolCallConversation
public List<Message> buildToolCallConversation(List<Message> previousMessages, AssistantMessage assistantMessage, ToolResponseMessage toolResponseMessage) Deprecated.- Overrides:
buildToolCallConversation
in classAbstractToolCallSupport
-
handleToolCalls
Deprecated.- Overrides:
handleToolCalls
in classAbstractToolCallSupport
-
processStream
public reactor.core.publisher.Flux<ChatResponse> processStream(ChatModel chatModel, Prompt prompt, Set<String> finishReasons, Function<AssistantMessage.ToolCall, String> customFunction) Deprecated. -
processCall
public ChatResponse processCall(ChatModel chatModel, Prompt prompt, Set<String> finishReasons, Function<AssistantMessage.ToolCall, String> customFunction) Deprecated.
-
ToolCallingManager
instead.