StreamingChatCompletionsUpdate Class
- java.
lang. Object - com.
azure. ai. inference. models. StreamingChatCompletionsUpdate
- com.
Implements
public final class StreamingChatCompletionsUpdate
implements JsonSerializable<StreamingChatCompletionsUpdate>
Represents a response update to a chat completions request, when the service is streaming updates using Server Sent Events (SSE). Completions support a wide variety of tasks and generate text that continues from or "completes" provided prompt data.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Streaming |
fromJson(JsonReader jsonReader)
Reads an instance of Streaming |
|
Streaming |
getChoice()
Get the choice property: The chat choice associated with this completion response. |
|
List<Streaming |
getChoices()
Get the choices property: An update to the collection of completion choices associated with this completions response. |
|
Offset |
getCreated()
Get the created property: The first timestamp associated with generation activity for this completions response, represented as seconds since the beginning of the Unix epoch of 00:00 on 1 Jan 1970. |
| String |
getId()
Get the id property: A unique identifier associated with this chat completions response. |
| String |
getModel()
Get the model property: The model used for the chat completion. |
|
Completions |
getUsage()
Get the usage property: Usage information for tokens processed and generated as part of this completions operation. |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Method Details
fromJson
public static StreamingChatCompletionsUpdate fromJson(JsonReader jsonReader)
Reads an instance of StreamingChatCompletionsUpdate from the JsonReader.
Parameters:
Returns:
Throws:
getChoice
public StreamingChatChoiceUpdate getChoice()
Get the choice property: The chat choice associated with this completion response.
Returns:
getChoices
public List<StreamingChatChoiceUpdate> getChoices()
Get the choices property: An update to the collection of completion choices associated with this completions response. Generally, `n` choices are generated per provided prompt with a default value of 1. Token limits and other settings may limit the number of choices generated.
Returns:
getCreated
public OffsetDateTime getCreated()
Get the created property: The first timestamp associated with generation activity for this completions response, represented as seconds since the beginning of the Unix epoch of 00:00 on 1 Jan 1970.
Returns:
getId
public String getId()
Get the id property: A unique identifier associated with this chat completions response.
Returns:
getModel
public String getModel()
Get the model property: The model used for the chat completion.
Returns:
getUsage
public CompletionsUsage getUsage()
Get the usage property: Usage information for tokens processed and generated as part of this completions operation.
Returns: