Package com.azure.ai.openai.models
Class ChatCompletionsJsonSchemaResponseFormatJsonSchema
java.lang.Object
com.azure.ai.openai.models.ChatCompletionsJsonSchemaResponseFormatJsonSchema
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ChatCompletionsJsonSchemaResponseFormatJsonSchema>
public final class ChatCompletionsJsonSchemaResponseFormatJsonSchema
extends Object
implements com.azure.json.JsonSerializable<ChatCompletionsJsonSchemaResponseFormatJsonSchema>
The ChatCompletionsJsonSchemaResponseFormatJsonSchema model.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ChatCompletionsJsonSchemaResponseFormatJsonSchema class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ChatCompletionsJsonSchemaResponseFormatJsonSchema from the JsonReader.Get the description property: A description of what the response format is for, used by the model to determine how to respond in the format.getName()Get the name property: The name of the response format.com.azure.core.util.BinaryDataGet the schema property: The schema property.isStrict()Get the strict property: Whether to enable strict schema adherence when generating the output.setDescription(String description) Set the description property: A description of what the response format is for, used by the model to determine how to respond in the format.setSchema(com.azure.core.util.BinaryData schema) Set the schema property: The schema property.Set the strict property: Whether to enable strict schema adherence when generating the output.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
-
ChatCompletionsJsonSchemaResponseFormatJsonSchema
Creates an instance of ChatCompletionsJsonSchemaResponseFormatJsonSchema class.- Parameters:
name- the name value to set.
-
-
Method Details
-
getDescription
Get the description property: A description of what the response format is for, used by the model to determine how to respond in the format.- Returns:
- the description value.
-
setDescription
Set the description property: A description of what the response format is for, used by the model to determine how to respond in the format.- Parameters:
description- the description value to set.- Returns:
- the ChatCompletionsJsonSchemaResponseFormatJsonSchema object itself.
-
getName
Get the name property: The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.- Returns:
- the name value.
-
getSchema
public com.azure.core.util.BinaryData getSchema()Get the schema property: The schema property.- Returns:
- the schema value.
-
setSchema
public ChatCompletionsJsonSchemaResponseFormatJsonSchema setSchema(com.azure.core.util.BinaryData schema) Set the schema property: The schema property.- Parameters:
schema- the schema value to set.- Returns:
- the ChatCompletionsJsonSchemaResponseFormatJsonSchema object itself.
-
isStrict
Get the strict property: Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs).- Returns:
- the strict value.
-
setStrict
Set the strict property: Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs).- Parameters:
strict- the strict value to set.- Returns:
- the ChatCompletionsJsonSchemaResponseFormatJsonSchema object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ChatCompletionsJsonSchemaResponseFormatJsonSchema>- Throws:
IOException
-
fromJson
public static ChatCompletionsJsonSchemaResponseFormatJsonSchema fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ChatCompletionsJsonSchemaResponseFormatJsonSchema from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ChatCompletionsJsonSchemaResponseFormatJsonSchema if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the ChatCompletionsJsonSchemaResponseFormatJsonSchema.
-