if an assistant is created
then a thread is created
made some conversation using the above assistant and thread
Question1: after above sequence, if I am not using assistant for long time, then will assistant will destroy automatically? if yes, what will be the duration (how long) after which assistant will destroy automatically?
Question2: same as Question1 but regarding a thread.
Or do I have to explicitly delete the assistant and thread if they are not required?
Thanks @_j ,
My takeaways are
For thread: it is 60 days of inactivity (and not 60 days from thread creation).
For assistant: no automatic deletion (only explicit deletion)
Wow. I’ve been “playing” with the Assistants API on-and-off for a couple of months. During this time run my code repeatedly, each time with a call like
“assistant = client.beta.assistants.create()”.
Today when to the Playground for the first time notices options such as “Assistants”, “Fine-Tuning”, “API-Keys”, etc. Totally surprised to find scores, no probably 100s, of “Assistants” waiting to be used/called. Wow, BIG surprise. How do I clean this up? It’s really, REALLY to do this one at a time with movement and clicks of my mouse. I hope there’s an OpenAI tool, and that I don’t need to write a program to enumerate and delete.
assistantdata = assistantsInJSON[“data”]
for numitems in assistantdata:
print(“This asst id is: \n”, numitems[“id”])
DelResponse = client.beta.assistants.delete(numitems[“id”])
print(DelResponse)
According to the guide, the assistants and threads created are not expired automatically. Users should reuse them or delete explicitly via the API or the dashboard.
** Objects related to the Assistants API are deleted from our servers 30 days after you delete them via the API or the dashboard. Objects that are not deleted via the API or dashboard are retained indefinitely.