java.lang.Object
nl.dannyj.mistral.models.completion.tool.Tool

public class Tool extends Object
Represents a tool that the model can call.
  • Constructor Details

    • Tool

      public Tool()
    • Tool

      public Tool(ToolType type, Function function)
      Creates a new Tool instance.
      Parameters:
      type - The type of the tool.
      function - The function definition.
  • Method Details

    • builder

      public static Tool.ToolBuilder builder()
    • getType

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

      public Function getFunction()
      The function definition. Required if type is "function".
      Returns:
      The function definition.
    • setType

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

      public void setFunction(Function function)
      The function definition. Required if type is "function".
      Parameters:
      function - The function definition.
    • equals

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

      protected boolean canEqual(Object other)
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object