Interface ToolCallingChatOptions.Builder<B extends ToolCallingChatOptions.Builder<B>>
- All Superinterfaces:
ChatOptions.Builder<B>
- All Known Implementing Classes:
AnthropicChatOptions.AbstractBuilder,AnthropicChatOptions.Builder,AzureOpenAiChatOptions.AbstractBuilder,AzureOpenAiChatOptions.Builder,BedrockChatOptions.AbstractBuilder,BedrockChatOptions.Builder,DeepSeekChatOptions.AbstractBuilder,DeepSeekChatOptions.Builder,DefaultToolCallingChatOptions.Builder,GoogleGenAiChatOptions.AbstractBuilder,GoogleGenAiChatOptions.Builder,MiniMaxChatOptions.AbstractBuilder,MiniMaxChatOptions.Builder,MistralAiChatOptions.AbstractBuilder,MistralAiChatOptions.Builder,OllamaChatOptions.AbstractBuilder,OllamaChatOptions.Builder,OpenAiSdkChatOptions.AbstractBuilder,OpenAiSdkChatOptions.Builder,ZhiPuAiChatOptions.AbstractBuilder,ZhiPuAiChatOptions.Builder
- Enclosing interface:
ToolCallingChatOptions
public static interface ToolCallingChatOptions.Builder<B extends ToolCallingChatOptions.Builder<B>>
extends ChatOptions.Builder<B>
A builder to create a
ToolCallingChatOptions instance.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build theChatOptions.frequencyPenalty(@Nullable Double frequencyPenalty) Builds with the frequency penalty to use for the chat.internalToolExecutionEnabled(@Nullable Boolean internalToolExecutionEnabled) Whether theChatModelis responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.Builds with the maximum number of tokens to use for the chat.Builds with the model to use for the chat.presencePenalty(@Nullable Double presencePenalty) Builds with the presence penalty to use for the chat.stopSequences(@Nullable List<String> stopSequences) Builds with the stop sequences to use for the chat.temperature(@Nullable Double temperature) Builds with the temperature to use for the chat.toolCallbacks(@Nullable List<ToolCallback> toolCallbacks) ToolCallbacks to be registered with the ChatModel.toolCallbacks(ToolCallback... toolCallbacks) ToolCallbacks to be registered with the ChatModel.toolContext(String key, Object value) Add a specific key/value pair to the tool context.toolContext(@Nullable Map<String, Object> context) Add aMapof context values into tool context.Names of the tools to register with the ChatModel.Names of the tools to register with the ChatModel.Builds with the top K to use for the chat.Builds with the top P to use for the chat.Methods inherited from interface org.springframework.ai.chat.prompt.ChatOptions.Builder
combineWith
-
Method Details
-
toolCallbacks
ToolCallbacks to be registered with the ChatModel. -
toolCallbacks
ToolCallbacks to be registered with the ChatModel. -
toolNames
Names of the tools to register with the ChatModel. -
toolNames
Names of the tools to register with the ChatModel. -
internalToolExecutionEnabled
Whether theChatModelis responsible for executing the tools requested by the model or if the tools should be executed directly by the caller. -
toolContext
Add aMapof context values into tool context.- Parameters:
context- the map representing the tool context.- Returns:
- the
ToolCallingChatOptionsBuilder.
-
toolContext
Add a specific key/value pair to the tool context.- Parameters:
key- the key to use.value- the corresponding value.- Returns:
- the
ToolCallingChatOptionsBuilder.
-
model
Description copied from interface:ChatOptions.BuilderBuilds with the model to use for the chat.- Specified by:
modelin interfaceChatOptions.Builder<B extends ToolCallingChatOptions.Builder<B>>- Parameters:
model-- Returns:
- the builder
-
frequencyPenalty
Description copied from interface:ChatOptions.BuilderBuilds with the frequency penalty to use for the chat.- Specified by:
frequencyPenaltyin interfaceChatOptions.Builder<B extends ToolCallingChatOptions.Builder<B>>- Parameters:
frequencyPenalty-- Returns:
- the builder.
-
maxTokens
Description copied from interface:ChatOptions.BuilderBuilds with the maximum number of tokens to use for the chat.- Specified by:
maxTokensin interfaceChatOptions.Builder<B extends ToolCallingChatOptions.Builder<B>>- Parameters:
maxTokens-- Returns:
- the builder.
-
presencePenalty
Description copied from interface:ChatOptions.BuilderBuilds with the presence penalty to use for the chat.- Specified by:
presencePenaltyin interfaceChatOptions.Builder<B extends ToolCallingChatOptions.Builder<B>>- Parameters:
presencePenalty-- Returns:
- the builder.
-
stopSequences
Description copied from interface:ChatOptions.BuilderBuilds with the stop sequences to use for the chat.- Specified by:
stopSequencesin interfaceChatOptions.Builder<B extends ToolCallingChatOptions.Builder<B>>- Parameters:
stopSequences-- Returns:
- the builder.
-
temperature
Description copied from interface:ChatOptions.BuilderBuilds with the temperature to use for the chat.- Specified by:
temperaturein interfaceChatOptions.Builder<B extends ToolCallingChatOptions.Builder<B>>- Parameters:
temperature-- Returns:
- the builder.
-
topK
Description copied from interface:ChatOptions.BuilderBuilds with the top K to use for the chat.- Specified by:
topKin interfaceChatOptions.Builder<B extends ToolCallingChatOptions.Builder<B>>- Parameters:
topK-- Returns:
- the builder.
-
topP
Description copied from interface:ChatOptions.BuilderBuilds with the top P to use for the chat.- Specified by:
topPin interfaceChatOptions.Builder<B extends ToolCallingChatOptions.Builder<B>>- Parameters:
topP-- Returns:
- the builder.
-
build
ToolCallingChatOptions build()Description copied from interface:ChatOptions.BuilderBuild theChatOptions.- Specified by:
buildin interfaceChatOptions.Builder<B extends ToolCallingChatOptions.Builder<B>>- Returns:
- the Chat options.
-