Class SpecificToolChoice
java.lang.Object
nl.dannyj.mistral.models.completion.tool.SpecificToolChoice
- All Implemented Interfaces:
ToolChoiceOption
Represents the object variant for the 'tool_choice' parameter in a ChatCompletionRequest.
This forces the model to call a specific function.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSpecificToolChoice
(ToolType type, FunctionName function) Creates a newSpecificToolChoice
instance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
boolean
The details of the function to be called.getType()
The type of the tool to be called.int
hashCode()
void
setFunction
(FunctionName function) The details of the function to be called.void
The type of the tool to be called.toString()
-
Constructor Details
-
SpecificToolChoice
public SpecificToolChoice() -
SpecificToolChoice
Creates a newSpecificToolChoice
instance.- Parameters:
type
- The type of the tool.function
- The function name.
-
-
Method Details
-
builder
-
getType
The type of the tool to be called. Currently, only "function" is supported.- Returns:
- The type of the tool.
-
getFunction
The details of the function to be called.- Returns:
- The function name.
-
setType
The type of the tool to be called. Currently, only "function" is supported.- Parameters:
type
- The type of the tool.
-
setFunction
The details of the function to be called.- Parameters:
function
- The function name.
-
equals
-
hashCode
public int hashCode() -
toString
-