Share via


OpenAIFileService.GetFileContentAsync(String, CancellationToken) Method

Definition

Retrieve the file content from a previously uploaded file.

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

Parameters

id
String

The uploaded file identifier.

cancellationToken
CancellationToken

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

Returns

The file content as BinaryContent

Remarks

Files uploaded with Assistants do not support content retrieval.

Applies to