When we create a thread, we have to maintain a handle to its ID - as there is no way in the API to discover this later on (you can get lists of assistants, assistant files, files, messages, runs).
This adds a layer of complexity to (particularly async) solutions which could be saved by implementing the endpoint GET: /v1/threads/
+1 to this, I would love to push even more of the state management into the api, but unfortunately because i cant list threads right now i still need to store the threads on my side.
Agreed! Also being able to filter the list by metadata params would be nice. For example, we store the userId in metadata and we just fetch the threads for that particular user. I think this will be a very common usecase.
@antoniov9 hard to tell because I was focusing on my cookie and session management troubles at that time, maybe 10-15? I will try tonight, maybe the throttling is removed by then?
If you’ve used playground to create a thread, what worked for me was to look for browsing history LOL. Once you know the assistant ID from the URL of any thread (including new ones) eg: “?assistant=asst_xxxx” searching that in your browsing history reveals all the past URLs which should include the thread ID as well eg: “&thread=thread_xxxx”. If you visit the same URL or call it via API it retrieves.
I’d also love to list threads that match a specific value in the metadata I defined. This would be very useful for accessing threads for a specific user. Obviously I can list them all and filter myself (well, once listing them is a thing!), but being able to filter them would be great.
Yes, While doing experiment in the Jupyter notebook, I have created many threads and also added message to the thread and created runs. But i didn’t store the thread ids. So now i have lost track all previous threads. Openai wont be able to delete my threads because they don’t know if i have stored the thread ids for future. so now they are dangling? it can neither be accessed nor it can be deleted, there must be solution for this
Looks like the endpoint is not available anymore via API. I get the following error:
Your request to GET /v1/threads must be made with a session key (that is, it can only be made from the browser). You made it with the following key type: secret.