Interface ToolCallingChatOptions

All Superinterfaces:
ChatOptions, ModelOptions
All Known Implementing Classes:
AnthropicChatOptions, AzureOpenAiChatOptions, DeepSeekChatOptions, DefaultToolCallingChatOptions, MiniMaxChatOptions, MistralAiChatOptions, OllamaOptions, OpenAiChatOptions, VertexAiGeminiChatOptions, ZhiPuAiChatOptions

public interface ToolCallingChatOptions extends ChatOptions
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
  • 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

      void setToolCallbacks(List<ToolCallback> toolCallbacks)
      Set the ToolCallbacks to be registered with the ChatModel.
    • getToolNames

      Set<String> getToolNames()
      Names of the tools to register with the ChatModel.
    • setToolNames

      void setToolNames(Set<String> toolNames)
      Set the names of the tools to register with the ChatModel.
    • getInternalToolExecutionEnabled

      @Nullable Boolean getInternalToolExecutionEnabled()
      Whether the ChatModel is responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.
    • setInternalToolExecutionEnabled

      void setInternalToolExecutionEnabled(@Nullable Boolean internalToolExecutionEnabled)
      Set whether the ChatModel is responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.
    • getToolContext

      Map<String,Object> getToolContext()
      Get the configured tool context.
      Returns:
      the tool context map.
    • setToolContext

      void setToolContext(Map<String,Object> toolContext)
      Set the tool context values as map.
      Parameters:
      toolContext - as map
    • builder

      A builder to create a new ToolCallingChatOptions instance.
      Returns:
      Returns a new ChatOptions.Builder.
    • isInternalToolExecutionEnabled

      static boolean isInternalToolExecutionEnabled(ChatOptions chatOptions)
    • mergeToolNames

      static Set<String> mergeToolNames(Set<String> runtimeToolNames, Set<String> defaultToolNames)
    • mergeToolCallbacks

      static List<ToolCallback> mergeToolCallbacks(List<ToolCallback> runtimeToolCallbacks, List<ToolCallback> defaultToolCallbacks)
    • mergeToolContext

      static Map<String,Object> mergeToolContext(Map<String,Object> runtimeToolContext, Map<String,Object> defaultToolContext)
    • validateToolCallbacks

      static void validateToolCallbacks(List<ToolCallback> toolCallbacks)