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 Details

    • 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.
    • getContent

      public String getContent()
      Get the content property: The content of the message.
      Returns:
      the content 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 com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.