Threads
Store conversation logs of your app in Tune Studio.
First thing you’ll need when you put your app in production is to store the conversation logs for your users or agents. To solve this we added ThreadsAPI to Tune Studio. See how to quickly start using it.
Threads & Messages
A thread is a conversation log between a user and the AI. For us a thread is a unit of thought for an AI. A thread is an
ordered list of messages, where each message contains a role
and content
. Here’s how you can create a thread using
our python package.
tuneapi
package manages the internal conversions for the provided
API vendors like AnthropicStoring Threads
You can store the threads in Tune Studio using the ThreadsAPI. To upload and save this thread use the following code.
The API will add the unique ID for the thread and store it in the Studio.
Getting Threads
To get the thread back from the Studio, you can use the following code. Remember to pass messages = True
to get the
contents of the messages as well.
Was this page helpful?