Interface ToolCallingChatOptions
- All Superinterfaces:
ChatOptions
,FunctionCallingOptions
,ModelOptions
- All Known Implementing Classes:
DefaultToolCallingChatOptions
,OllamaOptions
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. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
A builder to create a newToolCallingChatOptions
instance.ToolCallbacks to be registered with the ChatModel.getTools()
Names of the tools to register with the ChatModel.Whether theChatModel
is responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.static boolean
isInternalToolExecutionEnabled
(ChatOptions chatOptions) static List<FunctionCallback>
mergeToolCallbacks
(List<FunctionCallback> runtimeToolCallbacks, List<FunctionCallback> defaultToolCallbacks) mergeToolNames
(Set<String> runtimeToolNames, Set<String> defaultToolNames) void
setInternalToolExecutionEnabled
(Boolean internalToolExecutionEnabled) Set whether theChatModel
is responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.void
setToolCallbacks
(List<FunctionCallback> toolCallbacks) Set the ToolCallbacks to be registered 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
-
Field Details
-
DEFAULT_TOOL_EXECUTION_ENABLED
static final boolean DEFAULT_TOOL_EXECUTION_ENABLED- See Also:
-
-
Method Details
-
getToolCallbacks
List<FunctionCallback> getToolCallbacks()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. -
isInternalToolExecutionEnabled
Whether theChatModel
is responsible for executing the tools requested by the model or if the tools should be executed directly by the caller. -
setInternalToolExecutionEnabled
Set whether theChatModel
is responsible for executing the tools requested by the model or if the tools should be executed directly by the caller. -
builder
A builder to create a newToolCallingChatOptions
instance.- Returns:
- Returns
DefaultFunctionCallingOptionsBuilder
to create a new instance ofFunctionCallingOptions
.
-
isInternalToolExecutionEnabled
-
mergeToolNames
-
mergeToolCallbacks
static List<FunctionCallback> mergeToolCallbacks(List<FunctionCallback> runtimeToolCallbacks, List<FunctionCallback> defaultToolCallbacks)
-