Class ChatCompletionSchema
java.lang.Object
com.azure.search.documents.indexes.models.ChatCompletionSchema
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ChatCompletionSchema>
public final class ChatCompletionSchema
extends Object
implements com.azure.json.JsonSerializable<ChatCompletionSchema>
Object defining the custom schema the model will use to structure its output.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ChatCompletionSchemafromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ChatCompletionSchema from the JsonReader.Get the properties property: A JSON-formatted string that defines the output schema's properties and constraints for the model.Get the required property: An array of the property names that are required to be part of the model's response.getType()Get the type property: Type of schema representation.Get the additionalProperties property: Controls whether it is allowable for an object to contain additional keys / values that were not defined in the JSON Schema.setAdditionalProperties(Boolean additionalProperties) Set the additionalProperties property: Controls whether it is allowable for an object to contain additional keys / values that were not defined in the JSON Schema.setProperties(String properties) Set the properties property: A JSON-formatted string that defines the output schema's properties and constraints for the model.setRequired(List<String> required) Set the required property: An array of the property names that are required to be part of the model's response.Set the type property: Type of schema representation.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ChatCompletionSchema
public ChatCompletionSchema()Creates an instance of ChatCompletionSchema class.
-
-
Method Details
-
getType
Get the type property: Type of schema representation. Usually 'object'. Default is 'object'.- Returns:
- the type value.
-
setType
Set the type property: Type of schema representation. Usually 'object'. Default is 'object'.- Parameters:
type- the type value to set.- Returns:
- the ChatCompletionSchema object itself.
-
getProperties
Get the properties property: A JSON-formatted string that defines the output schema's properties and constraints for the model.- Returns:
- the properties value.
-
setProperties
Set the properties property: A JSON-formatted string that defines the output schema's properties and constraints for the model.- Parameters:
properties- the properties value to set.- Returns:
- the ChatCompletionSchema object itself.
-
getRequired
Get the required property: An array of the property names that are required to be part of the model's response. All properties must be included for structured outputs.- Returns:
- the required value.
-
setRequired
Set the required property: An array of the property names that are required to be part of the model's response. All properties must be included for structured outputs.- Parameters:
required- the required value to set.- Returns:
- the ChatCompletionSchema object itself.
-
isAdditionalProperties
Get the additionalProperties property: Controls whether it is allowable for an object to contain additional keys / values that were not defined in the JSON Schema. Default is false.- Returns:
- the additionalProperties value.
-
setAdditionalProperties
Set the additionalProperties property: Controls whether it is allowable for an object to contain additional keys / values that were not defined in the JSON Schema. Default is false.- Parameters:
additionalProperties- the additionalProperties value to set.- Returns:
- the ChatCompletionSchema object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ChatCompletionSchema>- Throws:
IOException
-
fromJson
public static ChatCompletionSchema fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ChatCompletionSchema from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ChatCompletionSchema if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the ChatCompletionSchema.
-