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
    Constructor
    Description
    Creates an instance of ChatCompletionSchema class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(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.
    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.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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

      public String getType()
      Get the type property: Type of schema representation. Usually 'object'. Default is 'object'.
      Returns:
      the type value.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.