IOpenAIClient.GetFileAsync

IOpenAIClient.GetFileAsync method

Retrieves details of a specific file asynchronously.

public Task<FileResponse> GetFileAsync(string fileId, 
    CancellationToken? cancellationToken = default)
ParameterTypeDescription
fileIdStringThe ID of the file to retrieve.
cancellationTokenNullable`1A token to cancel the operation.

Return Value

A task that represents the asynchronous operation. The task result contains the details of the file.

Exceptions

exceptioncondition
AIClientExceptionThrown when the file Id is null or empty.

See Also