Interface ToolChoice.Builder

  • Method Details

    • any

      Defines tools, at least one of which must be requested by the model. No text is generated but the results of tool use are sent back to the model to help generate a response.

      Parameters:
      any - Defines tools, at least one of which must be requested by the model. No text is generated but the results of tool use are sent back to the model to help generate a response.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • any

      Defines tools, at least one of which must be requested by the model. No text is generated but the results of tool use are sent back to the model to help generate a response.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to any(AnyToolChoice).

      Parameters:
      any - a consumer that will call methods on AnyToolChoice.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • auto

      Defines tools. The model automatically decides whether to call a tool or to generate text instead.

      Parameters:
      auto - Defines tools. The model automatically decides whether to call a tool or to generate text instead.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • auto

      Defines tools. The model automatically decides whether to call a tool or to generate text instead.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to auto(AutoToolChoice).

      Parameters:
      auto - a consumer that will call methods on AutoToolChoice.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • tool

      Defines a specific tool that the model must request. No text is generated but the results of tool use are sent back to the model to help generate a response.

      Parameters:
      tool - Defines a specific tool that the model must request. No text is generated but the results of tool use are sent back to the model to help generate a response.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tool

      Defines a specific tool that the model must request. No text is generated but the results of tool use are sent back to the model to help generate a response.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to tool(SpecificToolChoice).

      Parameters:
      tool - a consumer that will call methods on SpecificToolChoice.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: