ChatCompletionsResponseFormat Class
- java.
lang. Object - com.
azure. ai. inference. models. ChatCompletionsResponseFormat
- com.
Implements
public class ChatCompletionsResponseFormat
implements JsonSerializable<ChatCompletionsResponseFormat>
Represents the format that the model must output. Use this to enable JSON mode instead of the default text mode. Note that to enable JSON mode, some AI models may also require you to instruct the model to produce JSON via a system or user message.
Constructor Summary
| Constructor | Description |
|---|---|
| ChatCompletionsResponseFormat() |
Creates an instance of Chat |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Chat |
fromJson(JsonReader jsonReader)
Reads an instance of Chat |
| String |
getType()
Get the type property: The response format type to use for chat completions. |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
ChatCompletionsResponseFormat
public ChatCompletionsResponseFormat()
Creates an instance of ChatCompletionsResponseFormat class.
Method Details
fromJson
public static ChatCompletionsResponseFormat fromJson(JsonReader jsonReader)
Reads an instance of ChatCompletionsResponseFormat from the JsonReader.
Parameters:
Returns:
Throws:
getType
public String getType()
Get the type property: The response format type to use for chat completions.
Returns: