Share via


AgentsClient.GetFile Method

Definition

Overloads

GetFile(String, CancellationToken)

Returns information about a specific file. Does not retrieve file content.

GetFile(String, RequestContext)

[Protocol Method] Returns information about a specific file. Does not retrieve file content.

GetFile(String, CancellationToken)

Source:
AgentsClient.cs

Returns information about a specific file. Does not retrieve file content.

public virtual Azure.Response<Azure.AI.Projects.AgentFile> GetFile (string fileId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetFile : string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Projects.AgentFile>
override this.GetFile : string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Projects.AgentFile>
Public Overridable Function GetFile (fileId As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AgentFile)

Parameters

fileId
String

The ID of the file to retrieve.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

fileId is null.

fileId is an empty string, and was expected to be non-empty.

Applies to

GetFile(String, RequestContext)

Source:
AgentsClient.cs

[Protocol Method] Returns information about a specific file. Does not retrieve file content.

public virtual Azure.Response GetFile (string fileId, Azure.RequestContext context);
abstract member GetFile : string * Azure.RequestContext -> Azure.Response
override this.GetFile : string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetFile (fileId As String, context As RequestContext) As Response

Parameters

fileId
String

The ID of the file to retrieve.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

fileId is null.

fileId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to