DelegatingHostedFileClient.DownloadAsync Methode

Definitie

Hiermee downloadt u een bestand uit de AI-service.

public virtual System.Threading.Tasks.Task<Microsoft.Extensions.AI.HostedFileDownloadStream> DownloadAsync(string fileId, Microsoft.Extensions.AI.HostedFileClientOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadAsync : string * Microsoft.Extensions.AI.HostedFileClientOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Extensions.AI.HostedFileDownloadStream>
override this.DownloadAsync : string * Microsoft.Extensions.AI.HostedFileClientOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Extensions.AI.HostedFileDownloadStream>
Public Overridable Function DownloadAsync (fileId As String, Optional options As HostedFileClientOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HostedFileDownloadStream)

Parameters

fileId
String

De id van het bestand dat moet worden gedownload.

options
HostedFileClientOptions

Opties voor het configureren van het downloaden.

cancellationToken
CancellationToken

De CancellationToken te controleren op annuleringsaanvragen. De standaardwaarde is None.

Retouren

Een HostedFileDownloadStream met de bestandsinhoud. De stroom moet worden verwijderd wanneer deze niet meer nodig is.

Implementeringen

Van toepassing op