Class ChatCompletionResponseFormat
java.lang.Object
com.azure.search.documents.indexes.models.ChatCompletionResponseFormat
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ChatCompletionResponseFormat>
public final class ChatCompletionResponseFormat
extends Object
implements com.azure.json.JsonSerializable<ChatCompletionResponseFormat>
Determines how the language model's response should be serialized. Defaults to 'text'.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ChatCompletionResponseFormat class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ChatCompletionResponseFormatfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ChatCompletionResponseFormat from the JsonReader.Get the chatCompletionSchemaProperties property: An open dictionary for extended properties.getType()Get the type property: Specifies how the LLM should format the response.setChatCompletionSchemaProperties(ChatCompletionResponseFormatJsonSchemaProperties chatCompletionSchemaProperties) Set the chatCompletionSchemaProperties property: An open dictionary for extended properties.Set the type property: Specifies how the LLM should format the response.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
-
ChatCompletionResponseFormat
public ChatCompletionResponseFormat()Creates an instance of ChatCompletionResponseFormat class.
-
-
Method Details
-
getType
Get the type property: Specifies how the LLM should format the response. Possible values: 'text' (plain string), 'json_object' (arbitrary JSON), or 'json_schema' (adheres to provided schema).- Returns:
- the type value.
-
setType
Set the type property: Specifies how the LLM should format the response. Possible values: 'text' (plain string), 'json_object' (arbitrary JSON), or 'json_schema' (adheres to provided schema).- Parameters:
type- the type value to set.- Returns:
- the ChatCompletionResponseFormat object itself.
-
getChatCompletionSchemaProperties
Get the chatCompletionSchemaProperties property: An open dictionary for extended properties. Required if 'type' == 'json_schema'.- Returns:
- the chatCompletionSchemaProperties value.
-
setChatCompletionSchemaProperties
public ChatCompletionResponseFormat setChatCompletionSchemaProperties(ChatCompletionResponseFormatJsonSchemaProperties chatCompletionSchemaProperties) Set the chatCompletionSchemaProperties property: An open dictionary for extended properties. Required if 'type' == 'json_schema'.- Parameters:
chatCompletionSchemaProperties- the chatCompletionSchemaProperties value to set.- Returns:
- the ChatCompletionResponseFormat object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ChatCompletionResponseFormat>- Throws:
IOException
-
fromJson
public static ChatCompletionResponseFormat fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ChatCompletionResponseFormat from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ChatCompletionResponseFormat 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 ChatCompletionResponseFormat.
-