OpenAIAssistantAgent.InvokeStreamingAsync 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
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.
- 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.
- 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.