Class SpecificToolChoice

java.lang.Object
nl.dannyj.mistral.models.completion.tool.SpecificToolChoice
All Implemented Interfaces:
ToolChoiceOption

public final class SpecificToolChoice extends Object implements ToolChoiceOption
Represents the object variant for the 'tool_choice' parameter in a ChatCompletionRequest. This forces the model to call a specific function.
  • Constructor Details

    • SpecificToolChoice

      public SpecificToolChoice()
    • SpecificToolChoice

      public SpecificToolChoice(ToolType type, FunctionName function)
      Creates a new SpecificToolChoice instance.
      Parameters:
      type - The type of the tool.
      function - The function name.
  • Method Details

    • builder

    • getType

      public ToolType getType()
      The type of the tool to be called. Currently, only "function" is supported.
      Returns:
      The type of the tool.
    • getFunction

      public FunctionName getFunction()
      The details of the function to be called.
      Returns:
      The function name.
    • setType

      public void setType(ToolType type)
      The type of the tool to be called. Currently, only "function" is supported.
      Parameters:
      type - The type of the tool.
    • setFunction

      public void setFunction(FunctionName function)
      The details of the function to be called.
      Parameters:
      function - The function name.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object