Conversations
get_conversations
Get a list of conversations. The conversations are shallow and only contain the first user message. To get the full conversation, call get_conversation with the conversation ID.
Parameters
pagination
Pagination
The pagination parameters for retrieving the list of conversations.
filter
ConversationFilter
The filter parameters to refine the list of conversations.
Returns
paginated_response
PaginatedResponse[data: List[ConversationDict], pageInfo: PageInfo]
requiredThe list of conversations along with pagination information.
Example
Code Example
from chainlit.client.cloud import chainlit_client
from chainlit.types import Pagination, ConversationFilter
pagination = Pagination(first=10)
filter = ConversationFilter(feedback=1)
conversations = await chainlit_client.get_conversations(pagination, filter)
for conversation in conversations.data:
print(f"Conversation ID: {conversation['id']}")
print(f"Created At: {conversation['createdAt']}")
Was this page helpful?