Interface ToolCallingChatOptions
- All Superinterfaces:
ChatOptions,ModelOptions
- All Known Implementing Classes:
AnthropicChatOptions,AzureOpenAiChatOptions,DeepSeekChatOptions,DefaultToolCallingChatOptions,MiniMaxChatOptions,MistralAiChatOptions,OllamaOptions,OpenAiChatOptions,VertexAiGeminiChatOptions,ZhiPuAiChatOptions
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, Ilayaperumal Gopinathan
-
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.Whether theChatModelis responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.ToolCallbacks to be registered with the ChatModel.Get the configured tool context.Names of the tools to register with the ChatModel.static booleanisInternalToolExecutionEnabled(ChatOptions chatOptions) static List<ToolCallback>mergeToolCallbacks(List<ToolCallback> runtimeToolCallbacks, List<ToolCallback> 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<ToolCallback> toolCallbacks) Set the ToolCallbacks to be registered with the ChatModel.voidsetToolContext(Map<String, Object> toolContext) Set the tool context values as map.voidsetToolNames(Set<String> toolNames) Set the names of the tools to register with the ChatModel.static voidvalidateToolCallbacks(List<ToolCallback> toolCallbacks) Methods inherited from interface org.springframework.ai.chat.prompt.ChatOptions
copy, getFrequencyPenalty, getMaxTokens, getModel, getPresencePenalty, getStopSequences, getTemperature, getTopK, getTopP
-
Field Details
-
DEFAULT_TOOL_EXECUTION_ENABLED
static final boolean DEFAULT_TOOL_EXECUTION_ENABLED- See Also:
-
-
Method Details
-
getToolCallbacks
List<ToolCallback> 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. -
getInternalToolExecutionEnabled
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. -
getToolContext
Get the configured tool context.- Returns:
- the tool context map.
-
setToolContext
Set the tool context values as map.- Parameters:
toolContext- as map
-
builder
A builder to create a newToolCallingChatOptionsinstance.- Returns:
- Returns a new
ChatOptions.Builder.
-
isInternalToolExecutionEnabled
-
mergeToolNames
-
mergeToolCallbacks
static List<ToolCallback> mergeToolCallbacks(List<ToolCallback> runtimeToolCallbacks, List<ToolCallback> defaultToolCallbacks) -
mergeToolContext
-
validateToolCallbacks
-