Package com.azure.ai.inference.models
Class StreamingChatResponseMessageUpdate
java.lang.Object
com.azure.ai.inference.models.StreamingChatResponseMessageUpdate
- All Implemented Interfaces:
com.azure.json.JsonSerializable<StreamingChatResponseMessageUpdate>
public final class StreamingChatResponseMessageUpdate
extends Object
implements com.azure.json.JsonSerializable<StreamingChatResponseMessageUpdate>
A representation of a chat message update as received in a streaming response.
-
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of StreamingChatResponseMessageUpdate from the JsonReader.Get the content property: The content of the message.getRole()Get the role property: The chat role associated with the message.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.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
-
Method Details
-
getRole
Get the role property: The chat role associated with the message. If present, should always be 'assistant'.- Returns:
- the role value.
-
getContent
Get the content property: The content of the message.- Returns:
- the content value.
-
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<StreamingChatResponseMessageUpdate>- Throws:
IOException
-
fromJson
public static StreamingChatResponseMessageUpdate fromJson(com.azure.json.JsonReader jsonReader) throws IOException 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.
-