Freigeben über


IHostedFileClient.GetFileInfoAsync Methode

Definition

Ruft Metadaten zu einer Datei ab.

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

Parameter

fileId
String

Die ID der Datei.

options
HostedFileClientOptions

Optionen zum Konfigurieren der Anforderung.

cancellationToken
CancellationToken

Der CancellationToken zu überwachende Monitor für Abbruchanforderungen. Der Standardwert lautet None.

Gibt zurück

Informationen zur Datei oder null wenn sie nicht gefunden werden.

Ausnahmen

fileId ist null.

fileId ist leer oder Leerzeichen.

Gilt für: