Interface ToolConfiguration.Builder

    • Method Detail

      • tools

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

        An array of tools to pass to a model.

        Parameters:
        tools - An array of tools 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 to pass to a model.

        Parameters:
        tools - An array of tools 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 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)

        Defines which tools the model should request when invoked.

        Parameters:
        toolChoice - Defines which tools the model should request when invoked.
        Returns:
        Returns a reference to this object so that method calls can be chained together.