Class MistralAiApi.FunctionTool.Function

java.lang.Object
org.springframework.ai.mistralai.api.MistralAiApi.FunctionTool.Function
Enclosing class:
MistralAiApi.FunctionTool

public static class MistralAiApi.FunctionTool.Function extends Object
Function definition.
  • Constructor Details

    • Function

      public Function(String description, String name, Map<String,Object> parameters)
      Create tool function definition.
      Parameters:
      description - A description of what the function does, used by the model to choose when and how to call the function.
      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 - The parameters the functions accepts, described as a JSON Schema object. To describe a function that accepts no parameters, provide the value {"type": "object", "properties": {}}.
    • Function

      public Function(String description, String name, String jsonSchema)
      Create tool function definition.
      Parameters:
      description - tool function description.
      name - tool function name.
      jsonSchema - tool function schema as json.
  • Method Details

    • getDescription

      public String getDescription()
    • getName

      public String getName()
    • getParameters

      public Map<String,Object> getParameters()
    • setDescription

      public void setDescription(String description)
    • setName

      public void setName(String name)
    • setParameters

      public void setParameters(Map<String,Object> parameters)
    • getJsonSchema

      public String getJsonSchema()
    • setJsonSchema

      public void setJsonSchema(String jsonSchema)