ChatCompletionSchema Class

  • java.lang.Object
    • com.azure.search.documents.indexes.models.ChatCompletionSchema

Implements

public final class ChatCompletionSchema
implements JsonSerializable<ChatCompletionSchema>

Object defining the custom schema the model will use to structure its output.

Constructor Summary

Constructor Description
ChatCompletionSchema()

Creates an instance of ChatCompletionSchema class.

Method Summary

Modifier and Type Method and Description
static ChatCompletionSchema fromJson(JsonReader jsonReader)

Reads an instance of ChatCompletionSchema from the JsonReader.

String getProperties()

Get the properties property: A JSON-formatted string that defines the output schema's properties and constraints for the model.

List<String> getRequired()

Get the required property: An array of the property names that are required to be part of the model's response.

String getType()

Get the type property: Type of schema representation.

Boolean 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.

ChatCompletionSchema 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.

ChatCompletionSchema setProperties(String properties)

Set the properties property: A JSON-formatted string that defines the output schema's properties and constraints for the model.

ChatCompletionSchema 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.

ChatCompletionSchema setRequired(String[] required)

Set the required property: An array of the property names that are required to be part of the model's response.

ChatCompletionSchema setType(String type)

Set the type property: Type of schema representation.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

ChatCompletionSchema

public ChatCompletionSchema()

Creates an instance of ChatCompletionSchema class.

Method Details

fromJson

public static ChatCompletionSchema fromJson(JsonReader jsonReader)

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.

getProperties

public String 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.

getRequired

public List<String> 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.

getType

public String getType()

Get the type property: Type of schema representation. Usually 'object'. Default is 'object'.

Returns:

the type value.

isAdditionalProperties

public Boolean 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

public ChatCompletionSchema 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. Default is false.

Parameters:

additionalProperties - the additionalProperties value to set.

Returns:

the ChatCompletionSchema object itself.

setProperties

public ChatCompletionSchema setProperties(String properties)

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.

setRequired

public ChatCompletionSchema 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. All properties must be included for structured outputs.

Parameters:

required - the required value to set.

Returns:

the ChatCompletionSchema object itself.

setRequired

public ChatCompletionSchema setRequired(String[] required)

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.

setType

public ChatCompletionSchema setType(String type)

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to