Interface ToolCallingChatOptions
- All Superinterfaces:
ChatOptions,ModelOptions
- All Known Implementing Classes:
AnthropicChatOptions,BedrockChatOptions,DeepSeekChatOptions,DefaultToolCallingChatOptions,GoogleGenAiChatOptions,MistralAiChatOptions,OllamaChatOptions,OpenAiChatOptions
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, Christian Tzolov
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA builder to create aToolCallingChatOptionsinstance. -
Method Summary
Modifier and TypeMethodDescriptionstatic ToolCallingChatOptions.Builder<?>builder()A builder to create a newToolCallingChatOptionsinstance.@Nullable List<ToolCallback>ToolCallbacks to be registered with the ChatModel.Get the configured tool context.static @Nullable List<ToolCallback>mergeToolCallbacks(@Nullable List<ToolCallback> runtimeToolCallbacks, @Nullable List<ToolCallback> defaultToolCallbacks) mergeToolContext(@Nullable Map<String, Object> runtimeToolContext, @Nullable Map<String, Object> defaultToolContext) mutate()Returns a newToolCallingChatOptions.Builderinitialized with the values of thisToolCallingChatOptions.static voidvalidateToolCallbacks(@Nullable List<ToolCallback> toolCallbacks) Methods inherited from interface org.springframework.ai.chat.prompt.ChatOptions
getFrequencyPenalty, getMaxTokens, getModel, getPresencePenalty, getStopSequences, getTemperature, getTopK, getTopP
-
Method Details
-
getToolCallbacks
@Nullable List<ToolCallback> getToolCallbacks()ToolCallbacks to be registered with the ChatModel. -
getToolContext
Get the configured tool context.- Returns:
- the tool context map.
-
mutate
ToolCallingChatOptions.Builder<?> mutate()Returns a newToolCallingChatOptions.Builderinitialized with the values of thisToolCallingChatOptions. Narrows the return type ofChatOptions.mutate()so generic tool calling code can chain methods without casting.- Specified by:
mutatein interfaceChatOptions
-
builder
A builder to create a newToolCallingChatOptionsinstance.- Returns:
- Returns a new
ChatOptions.Builder.
-
mergeToolCallbacks
static @Nullable List<ToolCallback> mergeToolCallbacks(@Nullable List<ToolCallback> runtimeToolCallbacks, @Nullable List<ToolCallback> defaultToolCallbacks) -
mergeToolContext
-
validateToolCallbacks
-