Enum Class ToolChoiceEnum

java.lang.Object
java.lang.Enum<ToolChoiceEnum>
nl.dannyj.mistral.models.completion.tool.ToolChoiceEnum
All Implemented Interfaces:
Serializable, Comparable<ToolChoiceEnum>, Constable, ToolChoiceOption

public enum ToolChoiceEnum extends Enum<ToolChoiceEnum> implements ToolChoiceOption
Defines the possible string values for the 'tool_choice' parameter in a ChatCompletionRequest. It controls how the model responds to tool calls.
  • Enum Constant Details

    • AUTO

      public static final ToolChoiceEnum AUTO
      The model can choose to call a tool or not. This is the default behavior.
    • NONE

      public static final ToolChoiceEnum NONE
      The model will not call any tools.
    • ANY

      public static final ToolChoiceEnum ANY
      The model is forced to call at least one tool.
    • REQUIRED

      public static final ToolChoiceEnum REQUIRED
      The model is forced to call a specific tool (not directly represented by this enum, but this value indicates a tool must be called, potentially specified by an object). In the context of the enum, it implies a tool must be called. The OpenAPI spec also lists "required" as a string option.
  • Method Details

    • values

      public static ToolChoiceEnum[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ToolChoiceEnum valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Gets the string representation of the tool choice option.
      Returns:
      The tool choice option as a string.