Freigeben über


OpenAIFileService Class

Definition

Caution

Use OpenAI SDK or AzureOpenAI SDK clients for file operations. This class is deprecated and will be removed in a future version.

File service access for OpenAI: https://api.openai.com/v1/files

[System.Obsolete("Use OpenAI SDK or AzureOpenAI SDK clients for file operations. This class is deprecated and will be removed in a future version.")]
public sealed class OpenAIFileService
[<System.Obsolete("Use OpenAI SDK or AzureOpenAI SDK clients for file operations. This class is deprecated and will be removed in a future version.")>]
type OpenAIFileService = class
Public NotInheritable Class OpenAIFileService
Inheritance
OpenAIFileService
Attributes

Constructors

OpenAIFileService(String, String, HttpClient, ILoggerFactory)

Create an instance of the OpenAI chat completion connector

OpenAIFileService(Uri, String, String, String, HttpClient, ILoggerFactory)

Create an instance of the Azure OpenAI chat completion connector

Methods

DeleteFileAsync(String, CancellationToken)

Remove a previously uploaded file.

GetFileAsync(String, CancellationToken)

Retrieve metadata for a previously uploaded file.

GetFileContentAsync(String, CancellationToken)

Retrieve the file content from a previously uploaded file.

GetFilesAsync(CancellationToken)

Retrieve metadata for all previously uploaded files.

GetFilesAsync(Nullable<OpenAIFilePurpose>, CancellationToken)

Retrieve metadata for previously uploaded files

UploadContentAsync(BinaryContent, OpenAIFileUploadExecutionSettings, CancellationToken)

Upload a file.

Applies to