Freigeben über


OpenAIFileService.UploadContentAsync Method

Definition

Upload a file.

public System.Threading.Tasks.Task<Microsoft.SemanticKernel.Connectors.OpenAI.OpenAIFileReference> UploadContentAsync (Microsoft.SemanticKernel.BinaryContent fileContent, Microsoft.SemanticKernel.Connectors.OpenAI.OpenAIFileUploadExecutionSettings settings, System.Threading.CancellationToken cancellationToken = default);
member this.UploadContentAsync : Microsoft.SemanticKernel.BinaryContent * Microsoft.SemanticKernel.Connectors.OpenAI.OpenAIFileUploadExecutionSettings * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.Connectors.OpenAI.OpenAIFileReference>
Public Function UploadContentAsync (fileContent As BinaryContent, settings As OpenAIFileUploadExecutionSettings, Optional cancellationToken As CancellationToken = Nothing) As Task(Of OpenAIFileReference)

Parameters

fileContent
BinaryContent

The file content as BinaryContent

settings
OpenAIFileUploadExecutionSettings

The upload settings

cancellationToken
CancellationToken

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

Returns

The file metadata.

Applies to