Class DefaultToolCallingChatOptions
java.lang.Object
org.springframework.ai.model.tool.DefaultToolCallingChatOptions
- All Implemented Interfaces:
ChatOptions,ModelOptions,ToolCallingChatOptions
Default implementation of
ToolCallingChatOptions.- Since:
- 1.0.0
- Author:
- Thomas Vitale
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDefault implementation ofToolCallingChatOptions.Builder. -
Field Summary
Fields inherited from interface org.springframework.ai.model.tool.ToolCallingChatOptions
DEFAULT_TOOL_EXECUTION_ENABLED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultToolCallingChatOptions.Builder<?>builder()A builder to create a newToolCallingChatOptionsinstance.<T extends ChatOptions>
Tcopy()Returns a copy of thisChatOptions.@Nullable DoubleReturns the frequency penalty to use for the chat.@Nullable BooleanWhether theChatModelis responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.@Nullable IntegerReturns the maximum number of tokens to use for the chat.@Nullable StringgetModel()Returns the model to use for the chat.@Nullable DoubleReturns the presence penalty to use for the chat.Returns the stop sequences to use for the chat.@Nullable DoubleReturns the temperature to use for the chat.ToolCallbacks to be registered with the ChatModel.Get the configured tool context.Names of the tools to register with the ChatModel.@Nullable IntegergetTopK()Returns the top K to use for the chat.@Nullable DoublegetTopP()Returns the top P to use for the chat.mutate()Returns a newToolCallingChatOptions.Builderinitialized with the values of thisToolCallingChatOptions.
-
Constructor Details
-
DefaultToolCallingChatOptions
public DefaultToolCallingChatOptions()
-
-
Method Details
-
getToolCallbacks
Description copied from interface:ToolCallingChatOptionsToolCallbacks to be registered with the ChatModel.- Specified by:
getToolCallbacksin interfaceToolCallingChatOptions
-
getToolNames
Description copied from interface:ToolCallingChatOptionsNames of the tools to register with the ChatModel.- Specified by:
getToolNamesin interfaceToolCallingChatOptions
-
getToolContext
Description copied from interface:ToolCallingChatOptionsGet the configured tool context.- Specified by:
getToolContextin interfaceToolCallingChatOptions- Returns:
- the tool context map.
-
getInternalToolExecutionEnabled
Description copied from interface:ToolCallingChatOptionsWhether theChatModelis responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.- Specified by:
getInternalToolExecutionEnabledin interfaceToolCallingChatOptions
-
getModel
Description copied from interface:ChatOptionsReturns the model to use for the chat.- Specified by:
getModelin interfaceChatOptions- Returns:
- the model to use for the chat
-
getFrequencyPenalty
Description copied from interface:ChatOptionsReturns the frequency penalty to use for the chat.- Specified by:
getFrequencyPenaltyin interfaceChatOptions- Returns:
- the frequency penalty to use for the chat
-
getMaxTokens
Description copied from interface:ChatOptionsReturns the maximum number of tokens to use for the chat.- Specified by:
getMaxTokensin interfaceChatOptions- Returns:
- the maximum number of tokens to use for the chat
-
getPresencePenalty
Description copied from interface:ChatOptionsReturns the presence penalty to use for the chat.- Specified by:
getPresencePenaltyin interfaceChatOptions- Returns:
- the presence penalty to use for the chat
-
getStopSequences
Description copied from interface:ChatOptionsReturns the stop sequences to use for the chat.- Specified by:
getStopSequencesin interfaceChatOptions- Returns:
- the stop sequences to use for the chat
-
getTemperature
Description copied from interface:ChatOptionsReturns the temperature to use for the chat.- Specified by:
getTemperaturein interfaceChatOptions- Returns:
- the temperature to use for the chat
-
getTopK
Description copied from interface:ChatOptionsReturns the top K to use for the chat.- Specified by:
getTopKin interfaceChatOptions- Returns:
- the top K to use for the chat
-
getTopP
Description copied from interface:ChatOptionsReturns the top P to use for the chat.- Specified by:
getTopPin interfaceChatOptions- Returns:
- the top P to use for the chat
-
copy
Description copied from interface:ChatOptionsReturns a copy of thisChatOptions.- Specified by:
copyin interfaceChatOptions- Returns:
- a copy of this
ChatOptions
-
mutate
Description copied from interface:ToolCallingChatOptionsReturns 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- Specified by:
mutatein interfaceToolCallingChatOptions
-
builder
Description copied from interface:ToolCallingChatOptionsA builder to create a newToolCallingChatOptionsinstance.- Returns:
- Returns a new
ChatOptions.Builder.
-