The assistants API allow you to create, retrieve, modify, and delete threads. But there seems to be no way to list or delete all threads.
This means that if I programmatically create a bunch of threads (whether or not I add messages to them), those threads will presumably be idle somewhere attached to the assistant.
It would be nice to have an way to list and/or delete all threads for the sake of housekeeping. Or does this not matter?
Yeah. It actually freaked me out when I first tested it a couple of times. I was not able to delete a couple of threads. I was afraid it will go on and on and accumulate charges. lol
I expanded on this and posted python code a while back, giving an “organization explorer”, using web’s oauth mechanism instead to get account information and session key, then letting you list all organizations and projects within them, then a demo of listing that project’s threads (or the playground’s threads) where you could then continue writing the actual deleting.
I used “metadata” field available in the Assistant structure to store the association between assistant and thread so that I don’t need a complete list of all threads.