Language

TeamsStreamingWriter.AppendResponseAsync Method

Definition

Overloads

Name Description
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.

AppendResponseAsync(String, CancellationToken)

Appends chunk to the accumulated text and sends the full accumulated text as an intermediate streaming update (streamType = "streaming").

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

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.

Applies to