Share via


OpenAIAssistantAgent.InvokeStreamingAsync Method

Definition

Overloads

InvokeStreamingAsync(String, ChatHistory, KernelArguments, Kernel, CancellationToken)

Invoke the assistant on the specified thread.

InvokeStreamingAsync(String, ChatHistory, OpenAIAssistantInvocationOptions, KernelArguments, Kernel, CancellationToken)

Invoke the assistant on the specified thread.

InvokeStreamingAsync(String, ChatHistory, KernelArguments, Kernel, CancellationToken)

Invoke the assistant on the specified thread.

public System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.StreamingChatMessageContent> InvokeStreamingAsync (string threadId, Microsoft.SemanticKernel.ChatCompletion.ChatHistory messages, Microsoft.SemanticKernel.KernelArguments? arguments = default, Microsoft.SemanticKernel.Kernel? kernel = default, System.Threading.CancellationToken cancellationToken = default);
member this.InvokeStreamingAsync : string * Microsoft.SemanticKernel.ChatCompletion.ChatHistory * Microsoft.SemanticKernel.KernelArguments * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.StreamingChatMessageContent>
Public Function InvokeStreamingAsync (threadId As String, messages As ChatHistory, Optional arguments As KernelArguments = Nothing, Optional kernel As Kernel = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of StreamingChatMessageContent)

Parameters

threadId
String

The thread identifier

messages
ChatHistory

The receiver for the completed messages generated

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

Asynchronous enumeration of messages.

Remarks

The arguments parameter is not currently used by the agent, but is provided for future extensibility.

Applies to

InvokeStreamingAsync(String, ChatHistory, OpenAIAssistantInvocationOptions, KernelArguments, Kernel, CancellationToken)

Invoke the assistant on the specified thread.

public System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.StreamingChatMessageContent> InvokeStreamingAsync (string threadId, Microsoft.SemanticKernel.ChatCompletion.ChatHistory messages, Microsoft.SemanticKernel.Agents.OpenAI.OpenAIAssistantInvocationOptions? options, Microsoft.SemanticKernel.KernelArguments? arguments = default, Microsoft.SemanticKernel.Kernel? kernel = default, System.Threading.CancellationToken cancellationToken = default);
member this.InvokeStreamingAsync : string * Microsoft.SemanticKernel.ChatCompletion.ChatHistory * Microsoft.SemanticKernel.Agents.OpenAI.OpenAIAssistantInvocationOptions * Microsoft.SemanticKernel.KernelArguments * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.StreamingChatMessageContent>
Public Function InvokeStreamingAsync (threadId As String, messages As ChatHistory, options As OpenAIAssistantInvocationOptions, Optional arguments As KernelArguments = Nothing, Optional kernel As Kernel = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of StreamingChatMessageContent)

Parameters

threadId
String

The thread identifier

messages
ChatHistory

The receiver for the completed messages generated

options
OpenAIAssistantInvocationOptions

Optional invocation options

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

Asynchronous enumeration of messages.

Remarks

The arguments parameter is not currently used by the agent, but is provided for future extensibility.

Applies to