OpenAIAssistantAgent.InvokeAsync 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
InvokeAsync(String, KernelArguments, Kernel, CancellationToken) |
Invoke the assistant on the specified thread. |
InvokeAsync(String, OpenAIAssistantInvocationOptions, KernelArguments, Kernel, CancellationToken) |
Invoke the assistant on the specified thread. |
InvokeAsync(String, KernelArguments, Kernel, CancellationToken)
Invoke the assistant on the specified thread.
public System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.ChatMessageContent> InvokeAsync (string threadId, Microsoft.SemanticKernel.KernelArguments? arguments = default, Microsoft.SemanticKernel.Kernel? kernel = default, System.Threading.CancellationToken cancellationToken = default);
member this.InvokeAsync : string * Microsoft.SemanticKernel.KernelArguments * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.ChatMessageContent>
Public Function InvokeAsync (threadId As String, Optional arguments As KernelArguments = Nothing, Optional kernel As Kernel = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of ChatMessageContent)
Parameters
- threadId
- String
The thread identifier
- 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
InvokeAsync(String, OpenAIAssistantInvocationOptions, KernelArguments, Kernel, CancellationToken)
Invoke the assistant on the specified thread.
public System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.ChatMessageContent> InvokeAsync (string threadId, Microsoft.SemanticKernel.Agents.OpenAI.OpenAIAssistantInvocationOptions? options, Microsoft.SemanticKernel.KernelArguments? arguments = default, Microsoft.SemanticKernel.Kernel? kernel = default, System.Threading.CancellationToken cancellationToken = default);
member this.InvokeAsync : string * Microsoft.SemanticKernel.Agents.OpenAI.OpenAIAssistantInvocationOptions * Microsoft.SemanticKernel.KernelArguments * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.ChatMessageContent>
Public Function InvokeAsync (threadId As String, options As OpenAIAssistantInvocationOptions, Optional arguments As KernelArguments = Nothing, Optional kernel As Kernel = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of ChatMessageContent)
Parameters
- threadId
- String
The thread identifier
- 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.