DelegatingHostedFileClient.DownloadAsync Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
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.