TeamsStreamingWriter.AppendResponseAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| AppendResponseAsync(MessageActivityInput, CancellationToken) |
Appends |
| AppendResponseAsync(String, CancellationToken) |
Appends |
AppendResponseAsync(MessageActivityInput, CancellationToken)
Appends chunk's Text to the accumulated
text and sends the full accumulated text as an intermediate streaming update, rendered with
chunk's TextFormat when set.
public System.Threading.Tasks.Task AppendResponseAsync(Microsoft.Teams.Apps.MessageActivityInput chunk, System.Threading.CancellationToken cancellationToken = default);
member this.AppendResponseAsync : Microsoft.Teams.Apps.MessageActivityInput * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function AppendResponseAsync (chunk As MessageActivityInput, Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
- chunk
- MessageActivityInput
- cancellationToken
- CancellationToken
Returns
Remarks
Only Text and TextFormat are honored for intermediate chunks; attachments, entities, and other properties belong on the final message passed to FinalizeResponseAsync(MessageActivityInput, CancellationToken). When chunk carries a TextFormat, it becomes the format of this and subsequent streamed chunks (last-wins) and the final message's default format.
Applies to
AppendResponseAsync(String, CancellationToken)
Appends chunk to the accumulated text and sends the
full accumulated text as an intermediate streaming update (streamType = "streaming").
public System.Threading.Tasks.Task AppendResponseAsync(string chunk, System.Threading.CancellationToken cancellationToken = default);
member this.AppendResponseAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function AppendResponseAsync (chunk As String, Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
- chunk
- String
- cancellationToken
- CancellationToken
Returns
Remarks
Appending after FinalizeResponseAsync(MessageActivityInput, CancellationToken) reopens the stream on the same instance, starting a new streamed message.