StreamingChatResponseMessageUpdate Class

  • java.lang.Object
    • com.azure.ai.inference.models.StreamingChatResponseMessageUpdate

Implements

public final class StreamingChatResponseMessageUpdate
implements JsonSerializable<StreamingChatResponseMessageUpdate>

A representation of a chat message update as received in a streaming response.

Method Summary

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

Reads an instance of StreamingChatResponseMessageUpdate from the JsonReader.

String getContent()

Get the content property: The content of the message.

ChatRole getRole()

Get the role property: The chat role associated with the message.

List<StreamingChatResponseToolCallUpdate> getToolCalls()

Get the toolCalls property: The tool calls that must be resolved and have their outputs appended to subsequent input messages for the chat completions request to resolve as configured.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static StreamingChatResponseMessageUpdate fromJson(JsonReader jsonReader)

Reads an instance of StreamingChatResponseMessageUpdate from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of StreamingChatResponseMessageUpdate 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 StreamingChatResponseMessageUpdate.

getContent

public String getContent()

Get the content property: The content of the message.

Returns:

the content value.

getRole

public ChatRole getRole()

Get the role property: The chat role associated with the message. If present, should always be 'assistant'.

Returns:

the role value.

getToolCalls

public List<StreamingChatResponseToolCallUpdate> getToolCalls()

Get the toolCalls property: The tool calls that must be resolved and have their outputs appended to subsequent input messages for the chat completions request to resolve as configured.

Returns:

the toolCalls value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to