Interface ToolCallingChatOptions
- All Superinterfaces:
ChatOptions,FunctionCallingOptions,ModelOptions
- All Known Implementing Classes:
AnthropicChatOptions,AzureOpenAiChatOptions,DefaultToolCallingChatOptions,MistralAiChatOptions,OllamaOptions,OpenAiChatOptions,VertexAiGeminiChatOptions
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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA builder to create aToolCallingChatOptionsinstance. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuilder()A builder to create a newToolCallingChatOptionsinstance.ToolCallbacks to be registered with the ChatModel.Names of the tools to register with the ChatModel.Whether theChatModelis responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.static booleanisInternalToolExecutionEnabled(ChatOptions chatOptions) static List<FunctionCallback>mergeToolCallbacks(List<FunctionCallback> runtimeToolCallbacks, List<FunctionCallback> defaultToolCallbacks) mergeToolNames(Set<String> runtimeToolNames, Set<String> defaultToolNames) voidsetInternalToolExecutionEnabled(Boolean internalToolExecutionEnabled) Set whether theChatModelis responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.voidsetToolCallbacks(List<FunctionCallback> toolCallbacks) Set the ToolCallbacks to be registered with the ChatModel.voidsetToolNames(Set<String> toolNames) Set the names of the tools to register with the ChatModel.static voidvalidateToolCallbacks(List<FunctionCallback> toolCallbacks) Methods inherited from interface org.springframework.ai.chat.prompt.ChatOptions
copy, getFrequencyPenalty, getMaxTokens, getModel, getPresencePenalty, getStopSequences, getTemperature, getTopK, getTopPMethods 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. -
getToolNames
Names of the tools to register with the ChatModel. -
setToolNames
Set the names of the tools to register with the ChatModel. -
isInternalToolExecutionEnabled
Whether theChatModelis responsible for executing the tools requested by the model or if the tools should be executed directly by the caller. -
setInternalToolExecutionEnabled
Set whether theChatModelis 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 newToolCallingChatOptionsinstance.- Returns:
- Returns
DefaultFunctionCallingOptionsBuilderto create a new instance ofFunctionCallingOptions.
-
isInternalToolExecutionEnabled
-
mergeToolNames
-
mergeToolCallbacks
static List<FunctionCallback> mergeToolCallbacks(List<FunctionCallback> runtimeToolCallbacks, List<FunctionCallback> defaultToolCallbacks) -
mergeToolContext
-
validateToolCallbacks
-