Interface ToolCallingChatOptions
- All Superinterfaces:
ChatOptions
,FunctionCallingOptions
,ModelOptions
- All Known Implementing Classes:
DefaultToolCallingChatOptions
A set of options that can be used to configure the interaction with a chat model,
including tool calling.
- Since:
- 1.0.0
- Author:
- Thomas Vitale
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
A builder to create aToolCallingChatOptions
instance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
A builder to create a newToolCallingChatOptions
instance.ToolCallbacks to be registered with the ChatModel.Whether the result of each tool call should be returned directly or passed back to the model.getTools()
Names of the tools to register with the ChatModel.void
setToolCallbacks
(List<ToolCallback> toolCallbacks) Set the ToolCallbacks to be registered with the ChatModel.void
setToolCallbacks
(ToolCallback... toolCallbacks) Set the ToolCallbacks to be registered with the ChatModel.void
setToolCallReturnDirect
(Boolean toolCallReturnDirect) Set whether the result of each tool call should be returned directly or passed back to the model.void
Set the names of the tools to register with the ChatModel.void
Set the names of the tools to register with the ChatModel.Methods inherited from interface org.springframework.ai.chat.prompt.ChatOptions
copy, getFrequencyPenalty, getMaxTokens, getModel, getPresencePenalty, getStopSequences, getTemperature, getTopK, getTopP
Methods inherited from interface org.springframework.ai.model.function.FunctionCallingOptions
getFunctionCallbacks, getFunctions, getProxyToolCalls, getToolContext, setFunctionCallbacks, setFunctions, setProxyToolCalls, setToolContext
-
Method Details
-
getToolCallbacks
List<ToolCallback> getToolCallbacks()ToolCallbacks to be registered with the ChatModel. -
setToolCallbacks
Set the ToolCallbacks to be registered with the ChatModel. -
setToolCallbacks
Set the ToolCallbacks to be registered with the ChatModel. -
getTools
Names of the tools to register with the ChatModel. -
setTools
Set the names of the tools to register with the ChatModel. -
setTools
Set the names of the tools to register with the ChatModel. -
getToolCallReturnDirect
Whether the result of each tool call should be returned directly or passed back to the model. It can be overridden for eachToolCallback
instance viaToolMetadata.returnDirect()
. -
setToolCallReturnDirect
Set whether the result of each tool call should be returned directly or passed back to the model. It can be overridden for eachToolCallback
instance viaToolMetadata.returnDirect()
. -
builder
A builder to create a newToolCallingChatOptions
instance.- Returns:
- Returns
DefaultFunctionCallingOptionsBuilder
to create a new instance ofFunctionCallingOptions
.
-