Partager via


OpenAIFileService.GetFileAsync(String, CancellationToken) Method

Definition

Retrieve metadata for a previously uploaded file.

public System.Threading.Tasks.Task<Microsoft.SemanticKernel.Connectors.OpenAI.OpenAIFileReference> GetFileAsync (string id, System.Threading.CancellationToken cancellationToken = default);
member this.GetFileAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.Connectors.OpenAI.OpenAIFileReference>
Public Function GetFileAsync (id As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of OpenAIFileReference)

Parameters

id
String

The uploaded file identifier.

cancellationToken
CancellationToken

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

Returns

The metadata associated with the specified file identifier.

Applies to