Class Function.FunctionBuilder
java.lang.Object
nl.dannyj.mistral.models.completion.tool.Function.FunctionBuilder
- Enclosing class:
- Function
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
description
(String description) A description of what the function does, used by the model to choose when and how to call the function.The name of the function to be called.parameters
(String parameters) The parameters the function accepts, described as a JSON Schema object.strict
(boolean strict) Whether to enable strict schema adherence for the function parameters.toString()
-
Method Details
-
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
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
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
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
-
toString
-