Interface ToolCallingChatOptions.Builder
- All Superinterfaces:
ChatOptions.Builder
- All Known Implementing Classes:
DefaultToolCallingChatOptions.Builder
- Enclosing interface:
- ToolCallingChatOptions
A builder to create a
ToolCallingChatOptions
instance.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build theChatOptions
.frequencyPenalty
(Double frequencyPenalty) Builds with the frequency penalty to use for the chat.internalToolExecutionEnabled
(Boolean internalToolExecutionEnabled) Whether theChatModel
is 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
(Double presencePenalty) Builds with the presence penalty to use for the chat.stopSequences
(List<String> stopSequences) Builds with the stop sequences to use for the chat.temperature
(Double temperature) Builds with the temperature to use for the chat.toolCallbacks
(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
(Map<String, Object> context) Add aMap
of 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.
-
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
ToolCallingChatOptions.Builder internalToolExecutionEnabled(@Nullable Boolean internalToolExecutionEnabled) Whether theChatModel
is responsible for executing the tools requested by the model or if the tools should be executed directly by the caller. -
toolContext
Add aMap
of context values into tool context.- Parameters:
context
- the map representing the tool context.- Returns:
- the
ToolCallingChatOptions
Builder.
-
toolContext
Add a specific key/value pair to the tool context.- Parameters:
key
- the key to use.value
- the corresponding value.- Returns:
- the
ToolCallingChatOptions
Builder.
-
model
Description copied from interface:ChatOptions.Builder
Builds with the model to use for the chat.- Specified by:
model
in interfaceChatOptions.Builder
- Returns:
- the builder
-
frequencyPenalty
Description copied from interface:ChatOptions.Builder
Builds with the frequency penalty to use for the chat.- Specified by:
frequencyPenalty
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
maxTokens
Description copied from interface:ChatOptions.Builder
Builds with the maximum number of tokens to use for the chat.- Specified by:
maxTokens
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
presencePenalty
Description copied from interface:ChatOptions.Builder
Builds with the presence penalty to use for the chat.- Specified by:
presencePenalty
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
stopSequences
Description copied from interface:ChatOptions.Builder
Builds with the stop sequences to use for the chat.- Specified by:
stopSequences
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
temperature
Description copied from interface:ChatOptions.Builder
Builds with the temperature to use for the chat.- Specified by:
temperature
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
topK
Description copied from interface:ChatOptions.Builder
Builds with the top K to use for the chat.- Specified by:
topK
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
topP
Description copied from interface:ChatOptions.Builder
Builds with the top P to use for the chat.- Specified by:
topP
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
build
ToolCallingChatOptions build()Description copied from interface:ChatOptions.Builder
Build theChatOptions
.- Specified by:
build
in interfaceChatOptions.Builder
- Returns:
- the Chat options.
-