Class Function.FunctionBuilder

java.lang.Object
nl.dannyj.mistral.models.completion.tool.Function.FunctionBuilder
Enclosing class:
Function

public static class Function.FunctionBuilder extends Object
  • Method Details

    • name

      public Function.FunctionBuilder name(String name)
      The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
      Parameters:
      name - The name of the function.
      Returns:
      this.
    • description

      public Function.FunctionBuilder description(String description)
      A description of what the function does, used by the model to choose when and how to call the function.
      Parameters:
      description - The description of the function.
      Returns:
      this.
    • parameters

      public Function.FunctionBuilder parameters(String parameters)
      The parameters the function accepts, described as a JSON Schema object. See the guide for more information. The user of this SDK should provide a valid JSON string representing the schema.
      Parameters:
      parameters - A JSON string representing the parameters schema.
      Returns:
      this.
    • strict

      public Function.FunctionBuilder strict(boolean strict)
      Whether to enable strict schema adherence for the function parameters. When true, the model will make a best effort to adhere to the JSON schema. See the guide for more details. Defaults to false.
      Parameters:
      strict - Whether strict schema adherence is enabled.
      Returns:
      this.
    • build

      public Function build()
    • toString

      public String toString()
      Overrides:
      toString in class Object