Share via


OpenAIClientExtensions.DeleteFileAsync Method

Definition

Deletes a file asynchronously.

public static System.Threading.Tasks.Task<bool> DeleteFileAsync(this OpenAI.OpenAIClient client, string fileId, System.Threading.CancellationToken cancellationToken = default);
static member DeleteFileAsync : OpenAI.OpenAIClient * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
<Extension()>
Public Function DeleteFileAsync (client As OpenAIClient, fileId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)

Parameters

client
OpenAI.OpenAIClient

The OpenAI client instance.

fileId
String

The identifier of the file to delete.

cancellationToken
CancellationToken

The cancellation token to monitor for cancellation requests.

Returns

A boolean indicating whether the file was successfully deleted.

Applies to