OpenTelemetryHostedFileClient.DownloadAsync Methode

Definitie

Hiermee downloadt u een bestand uit de AI-service.

public override System.Threading.Tasks.Task<Microsoft.Extensions.AI.HostedFileDownloadStream> DownloadAsync(string fileId, Microsoft.Extensions.AI.HostedFileClientOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
override this.DownloadAsync : string * Microsoft.Extensions.AI.HostedFileClientOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Extensions.AI.HostedFileDownloadStream>
Public Overrides 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.

Van toepassing op