Share via


ProjectConversationsClient.GetProjectConversationsAsync Method

Definition

Returns the list of all conversations.

public virtual System.ClientModel.AsyncCollectionResult<Azure.AI.Projects.OpenAI.ProjectConversation> GetProjectConversationsAsync(Azure.AI.Projects.OpenAI.AgentReference agent = default, int? limit = default, string order = default, string after = default, string before = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetProjectConversationsAsync : Azure.AI.Projects.OpenAI.AgentReference * Nullable<int> * string * string * string * System.Threading.CancellationToken -> System.ClientModel.AsyncCollectionResult<Azure.AI.Projects.OpenAI.ProjectConversation>
override this.GetProjectConversationsAsync : Azure.AI.Projects.OpenAI.AgentReference * Nullable<int> * string * string * string * System.Threading.CancellationToken -> System.ClientModel.AsyncCollectionResult<Azure.AI.Projects.OpenAI.ProjectConversation>
Public Overridable Function GetProjectConversationsAsync (Optional agent As AgentReference = Nothing, Optional limit As Nullable(Of Integer) = Nothing, Optional order As String = Nothing, Optional after As String = Nothing, Optional before As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncCollectionResult(Of ProjectConversation)

Parameters

agent
AgentReference

If provided, only conversations associated with the referenced agent will be retrieved.

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
String

Sort order by the created_at timestamp of the objects. asc for ascending order anddesc 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 that can be used to cancel the operation.

Returns

Exceptions

Service returned a non-success status code.

Applies to