Interface ToolConfiguration.Builder

    • Method Detail

      • tools

        ToolConfiguration.Builder tools​(Collection<Tool> tools)

        An array of tools that you want to pass to a model.

        Parameters:
        tools - An array of tools that you want to pass to a model.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • tools

        ToolConfiguration.Builder tools​(Tool... tools)

        An array of tools that you want to pass to a model.

        Parameters:
        tools - An array of tools that you want to pass to a model.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • tools

        ToolConfiguration.Builder tools​(Consumer<Tool.Builder>... tools)

        An array of tools that you want to pass to a model.

        This is a convenience method that creates an instance of the Tool.Builder avoiding the need to create one manually via Tool.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #tools(List).

        Parameters:
        tools - a consumer that will call methods on Tool.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #tools(java.util.Collection)
      • toolChoice

        ToolConfiguration.Builder toolChoice​(ToolChoice toolChoice)

        If supported by model, forces the model to request a tool.

        Parameters:
        toolChoice - If supported by model, forces the model to request a tool.
        Returns:
        Returns a reference to this object so that method calls can be chained together.