I am using application with 5 assistants gpt-4o-mini for file_search. It happens so often they to be deleted in one week, so we need to create new 5 almost 3 times a week.
The same issue appears for files added as attachments in thread. When the assistant process the thread, says can’t access the files.
Does someone now why the assistants magically disappear?
I will appreciate an answer for this question because this problem happens a lot
That seems pretty unusual. There’s no expiration method for Assistants. They should be there until you clean them up.
You mention “we need to create”. Perhaps you should investigate who else can access your organization, either by invitation and being a member, or by having an API key, even a “legacy user key” that you’ll find in your profile’s billing. Revoke everybody that could be a prankster or be pressing the wrong buttons, and reset your login password or authentication method password.
There is also a small hint of “scoping” in the API. That an assistant, or at least its user data, could be contained in a project as a container. So assistants should be created by API call using the same project API key consistently.
You can report back if, when it is just one trusted person with platform account access, and everyone else has to employ the assistant through a chatbot application, if all your problems stop.
It happens a lot. The assistants are only accessed by API call in the same project and only me can access them or the playground. It is a very strange and pressure issue and I don’t have a clue why it is happening.
The some problems happens with the attachments to thread. The file objects are created, but when assistant answer to it, says it can’t find files in vector store.
Usually happens when there is some bug in OpenAI or upgrade. I don’t know what to do.
There is only a log of billing, token consumption by model, and it still isn’t as granular as one might want.
You can turn on thread inspection, and then wait for threads to load in the dashboard, to see if there is any unusual pattern by time of use or content. Time that the assistants goes “poof” correlated to threads: “I wish I could delete this conversation in the UI so I’m pressing any delete button I see, sincerely, intruder.”
You can find a machine where you can polll “get assistant” on the API every few minutes and log when the disappearance is happening.
If you don’t know the reason, spend the time to do all the account lockdown and key rotation I mention, and be sure your application has no API key in code, but rather by environment variable outside of web space or from a secrets vault.
I have only seen situations where the assistant instructions can sometimes get deleted in the playground. This happens when I’m switching between a new assistant with no instructions and an old one. It seems that perhaps some session vars are slow to update. I’ve started treating my instructions as “code” and actually version control them in my repo.
That said, I’ve been running with the same assistant keys for over a year and never had one disappear.
Your second issue of the files is a bit trickier. I’ve had the best luck attaching files by first uploading them to the platform (no vector store) and then attaching that file_id to the message thread vs. trying to create a message with a file upload. It seems the smoothest if you first give the platform the file, then attach a known file_id.
Your third comment on uploading to a vector store vs. attaching a file is also a different scenario. I’ve found that files loaded to a vector store are subject to “slow processing” at times. The vector store needs some time to digest what you’ve given it - especially if it’s large. Vector store updates are not “real time”, so if you execute a query right a way against a fresh upload it may not be found.
I create file and than attach the file_id as attachments in the message in the thread. There is no error receiving backwards as I am waiting the thread and status to be done, but when the assistant tries file_search says that the vector_store is empty.
Attaching a file to a message does not automatically load it to a vector store. Either attach it to the message or load it into the vector store. Make sure your assistant has file search turned on in it’s configuration. Sending it dynamically via the message thread doesn’t tell the assistant to use the file search
Actually, it does. When you attach a file with tool:file_search, a vector store is actually and automatically created. This new vector store has an expiration of 7 days of inactivity. The results are combined with an assistant vector store in file_search results.
The API is supposed to hold back a thread’s run until this is done being extracted and incorporated.
apologies - appreciate the correction. I was speaking of a previously created/attached vector store. It does or does not “auto” attach the file in that case, does it? if it’s supposed to, I haven’t seen that behavior.
So two types of vector stores here for clarity:
a) named vector store previously created and attached
b) temporary vector store for the purpose of processing the message thread
Well, happen to me multiple times (sometimes are missing, functions missing, I got an troll message once in the assistant instructions and instructions were gone)… And that was 1 year ago when I was working at Multi-Agent System.
I do not trust them anymore, and is not because of files.
I think we both know what is really going on here…
They have a system for scrapping all Custom GPTs, all Assistants (instructions, functions, settings), etc.
It is like they are swimming in an ocean of gold nuggets.
Poll the retrieve vector store file objects until all report completed. retrieve vector store object until all file counts are have switched status to success without a failed.
It is higher likelihood that seeing all files reporting success is a signal to proceed and receive success than trusting some internal system to operate properly.