OpenAIFileService.UploadContentAsync 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.
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.