Freigeben über


OpenAIAssistantAgent.RetrieveAsync Method

Definition

Retrieve a OpenAIAssistantAgent by identifier.

public static System.Threading.Tasks.Task<Microsoft.SemanticKernel.Agents.OpenAI.OpenAIAssistantAgent> RetrieveAsync (Microsoft.SemanticKernel.Kernel kernel, Microsoft.SemanticKernel.Agents.OpenAI.OpenAIClientProvider provider, string id, System.Threading.CancellationToken cancellationToken = default);
static member RetrieveAsync : Microsoft.SemanticKernel.Kernel * Microsoft.SemanticKernel.Agents.OpenAI.OpenAIClientProvider * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.Agents.OpenAI.OpenAIAssistantAgent>
Public Shared Function RetrieveAsync (kernel As Kernel, provider As OpenAIClientProvider, id As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of OpenAIAssistantAgent)

Parameters

kernel
Kernel

The Kernel containing services, plugins, and other state for use throughout the operation.

provider
OpenAIClientProvider

Configuration for accessing the API service.

id
String

The agent identifier

cancellationToken
CancellationToken

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

Returns

An OpenAIAssistantAgent instance

Applies to