Retrieves a list of all conversation threads for a specified assistant. Useful for finding and resuming previous conversations.
Usage
cassidy_list_threads(
assistant_id = Sys.getenv("CASSIDY_ASSISTANT_ID"),
api_key = Sys.getenv("CASSIDY_API_KEY"),
limit = 100
)Value
A cassidy_thread_list S3 object containing:
- threads
A data frame with thread_id, created_at, last_message, and message_count
- assistant_id
The assistant these threads belong to
- total
Total number of threads
See also
Other api-functions:
cassidy_create_thread(),
cassidy_get_thread(),
cassidy_send_message()
Examples
if (FALSE) { # \dontrun{
# List all threads
threads <- cassidy_list_threads()
print(threads)
# Access as data frame
threads$threads
# Get most recent thread
recent <- threads$threads[1, ]
cassidy_get_thread(recent$thread_id)
} # }