Freigeben über


AssistantsClient.GetAssistantFiles Method

Definition

Gets a list of files attached to a specific assistant, as used by tools that can read files.

public virtual Azure.Response<Azure.AI.OpenAI.Assistants.PageableList<Azure.AI.OpenAI.Assistants.AssistantFile>> GetAssistantFiles (string assistantId, int? limit = default, Azure.AI.OpenAI.Assistants.ListSortOrder? order = default, string after = default, string before = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAssistantFiles : string * Nullable<int> * Nullable<Azure.AI.OpenAI.Assistants.ListSortOrder> * string * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.OpenAI.Assistants.PageableList<Azure.AI.OpenAI.Assistants.AssistantFile>>
override this.GetAssistantFiles : string * Nullable<int> * Nullable<Azure.AI.OpenAI.Assistants.ListSortOrder> * string * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.OpenAI.Assistants.PageableList<Azure.AI.OpenAI.Assistants.AssistantFile>>
Public Overridable Function GetAssistantFiles (assistantId As String, Optional limit As Nullable(Of Integer) = Nothing, Optional order As Nullable(Of ListSortOrder) = Nothing, Optional after As String = Nothing, Optional before As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of PageableList(Of AssistantFile))

Parameters

assistantId
String

The ID of the assistant to retrieve the list of attached files for.

limit
Nullable<Int32>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

order
Nullable<ListSortOrder>

Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.

after
String

A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

before
String

A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

assistantId is null.

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

Applies to