Share via


ChatHistoryAgent.InvokeStreamingAsync Method

Definition

Caution

Use InvokeStreamingAsync with AgentThread instead.

Invokes the assistant to respond to the provided history with streaming response.

[System.Obsolete("Use InvokeStreamingAsync with AgentThread instead.")]
public abstract System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.StreamingChatMessageContent> InvokeStreamingAsync(Microsoft.SemanticKernel.ChatCompletion.ChatHistory history, Microsoft.SemanticKernel.KernelArguments? arguments = default, Microsoft.SemanticKernel.Kernel? kernel = default, System.Threading.CancellationToken cancellationToken = default);
[<System.Obsolete("Use InvokeStreamingAsync with AgentThread instead.")>]
override this.InvokeStreamingAsync : Microsoft.SemanticKernel.ChatCompletion.ChatHistory * Microsoft.SemanticKernel.KernelArguments * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.StreamingChatMessageContent>
Public MustOverride Function InvokeStreamingAsync (history As ChatHistory, Optional arguments As KernelArguments = Nothing, Optional kernel As Kernel = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of StreamingChatMessageContent)

Parameters

history
ChatHistory

The conversation history.

arguments
KernelArguments

Optional arguments to pass to the agents's invocation, including any PromptExecutionSettings.

kernel
Kernel

The Kernel containing services, plugins, and other state for use by the agent.

cancellationToken
CancellationToken

The CancellationToken to monitor for cancellation requests. The default is None.

Returns

An asynchronous enumeration of response messages.

Attributes

Applies to