OpenAIFileService.GetFileContentAsync(String, CancellationToken) 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.
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.