Interface ToolChoice.Builder

    • Method Detail

      • auto

        ToolChoice.Builder auto​(AutoToolChoice 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.
      • any

        ToolChoice.Builder any​(AnyToolChoice 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.
      • tool

        ToolChoice.Builder tool​(SpecificToolChoice 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.