IHostedFileClient.GetFileInfoAsync Metod

Definition

Hämtar metadata om en fil.

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)

Parametrar

fileId
String

ID:t för filen.

options
HostedFileClientOptions

Alternativ för att konfigurera begäran.

cancellationToken
CancellationToken

Övervaka CancellationToken för annulleringsbegäranden. Standardvärdet är None.

Returer

Information om filen eller null om den inte hittas.

Undantag

fileId är null.

fileId är tomt eller tomt utrymme.

Gäller för