ChatCompletionResponseFormat Class

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

Implements

public final class ChatCompletionResponseFormat
implements JsonSerializable<ChatCompletionResponseFormat>

Determines how the language model's response should be serialized. Defaults to 'text'.

Constructor Summary

Constructor Description
ChatCompletionResponseFormat()

Creates an instance of ChatCompletionResponseFormat class.

Method Summary

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

Reads an instance of ChatCompletionResponseFormat from the JsonReader.

ChatCompletionSchemaProperties getJsonSchemaProperties()

Get the jsonSchemaProperties property: An open dictionary for extended properties.

ChatCompletionResponseFormatType getType()

Get the type property: Specifies how the LLM should format the response.

ChatCompletionResponseFormat setJsonSchemaProperties(ChatCompletionSchemaProperties jsonSchemaProperties)

Set the jsonSchemaProperties property: An open dictionary for extended properties.

ChatCompletionResponseFormat setType(ChatCompletionResponseFormatType type)

Set the type property: Specifies how the LLM should format the response.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

ChatCompletionResponseFormat

public ChatCompletionResponseFormat()

Creates an instance of ChatCompletionResponseFormat class.

Method Details

fromJson

public static ChatCompletionResponseFormat fromJson(JsonReader jsonReader)

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.

getJsonSchemaProperties

public ChatCompletionSchemaProperties getJsonSchemaProperties()

Get the jsonSchemaProperties property: An open dictionary for extended properties. Required if 'type' == 'json_schema'.

Returns:

the jsonSchemaProperties value.

getType

public ChatCompletionResponseFormatType getType()

Get the type property: Specifies how the LLM should format the response.

Returns:

the type value.

setJsonSchemaProperties

public ChatCompletionResponseFormat setJsonSchemaProperties(ChatCompletionSchemaProperties jsonSchemaProperties)

Set the jsonSchemaProperties property: An open dictionary for extended properties. Required if 'type' == 'json_schema'.

Parameters:

jsonSchemaProperties - the jsonSchemaProperties value to set.

Returns:

the ChatCompletionResponseFormat object itself.

setType

public ChatCompletionResponseFormat setType(ChatCompletionResponseFormatType type)

Set the type property: Specifies how the LLM should format the response.

Parameters:

type - the type value to set.

Returns:

the ChatCompletionResponseFormat object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to