Resource: StreamMessage
A streaming message in a Google Chat space. Stream messages let Chat apps display incremental progress updates, steps, citations, and text chunks before committing a finalized message.
| JSON representation |
|---|
{ "name": string, "progressText": string, "streamContentChunks": [ { object ( |
| Fields | |
|---|---|
name |
Identifier. Resource name of the stream message. Format: |
progressText |
Required. Plain-text progress status displayed for the active stream message. Maximum length is 250 characters. Must be non-empty when creating a stream message or when included in |
streamContentChunks[] |
Optional. Input only. A list of chunks that define the content of the stream message. |
markupSyntax |
Optional. Specifies how the server interprets the stream content chunks. |
nextChunkToken |
Optional. Token returned by the server for sequencing subsequent stream requests. Pass this token as |
| Required. The reference that the stream message is anchored to. One of the following is required: The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
referencedMessage |
Resource name of the message that the stream message is referencing, such as the user message that invoked the Chat app. Must belong to the same space and be accessible to the Chat app. The space must have threading enabled. Format: |
| End of mutually exclusive fields. | |
StreamContentChunk
A chunk of content within a stream message.
| JSON representation |
|---|
{ "text": string, "step": { object ( |
| Fields | |
|---|---|
| The content of the chunk. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
text |
Optional. Text content of the stream message. Concatenated across append requests and replaced when |
step |
Optional. A step that the Chat app performed while generating the response, such as a reasoning step or tool call. |
card |
Optional. A card. Only supported when committing a stream message. To learn how to create a message that contains cards, see Send a message. Design and preview cards with the Card Builder. Open the Card Builder |
accessoryWidget |
Optional. An interactive widget that appears at the bottom of a message. Only supported when committing a stream message. For details, see Add interactive widgets at the bottom of a message. |
citation |
Optional. An inline citation referenced within the message text (via |
citedSource |
Optional. A source to be displayed under the message as a footer link. Only supported when committing a stream message. |
| End of mutually exclusive fields. | |
Methods |
|
|---|---|
|
Appends content chunks to an existing stream message in a Google Chat space. |
|
Commits an active stream message into a finalized message in a Google Chat space. |
|
Initiates a new stream message in a Google Chat space. |
|
Deletes an active stream message in a Google Chat space. |
|
Updates fields in an active stream message in a Google Chat space. |