Class ResponseFormat
java.lang.Object
nl.dannyj.mistral.models.completion.ResponseFormat
The response format of a completion request.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for creating a ResponseFormat object with a specified type.ResponseFormat
(ResponseFormats type, JsonSchema jsonSchema) Creates a newResponseFormat
instance. -
Method Summary
Modifier and TypeMethodDescriptionThe JSON schema definition to use when type is JSON_SCHEMA.getType()
The type of the response format.void
setJsonSchema
(JsonSchema jsonSchema) The JSON schema definition to use when type is JSON_SCHEMA.void
setType
(ResponseFormats type) The type of the response format.toString()
-
Constructor Details
-
ResponseFormat
Constructor for creating a ResponseFormat object with a specified type.- Parameters:
type
- The type of the response format.
-
ResponseFormat
Creates a newResponseFormat
instance.- Parameters:
type
- The type of the response format.jsonSchema
- The JSON schema definition.
-
ResponseFormat
public ResponseFormat()
-
-
Method Details
-
getType
The type of the response format. Currently, can either be TEXT or JSON.- Returns:
- The type of the response format.
-
getJsonSchema
The JSON schema definition to use when type is JSON_SCHEMA.- Returns:
- The JSON schema definition.
-
setType
The type of the response format. Currently, can either be TEXT or JSON.- Parameters:
type
- The type of the response format.
-
setJsonSchema
The JSON schema definition to use when type is JSON_SCHEMA.- Parameters:
jsonSchema
- The JSON schema definition.
-
toString
-