Assistants API missing some files

Assistants API has two uploaded files. It tells you it has both when prompted, and you can see it in the Playground tab. But if you click on the Assistant in the Assistants tab, it only shows File 1, File 2 is missing.

And if you query the OpenAI Python assistant object’s “file_ids” attribute, it only shows File 1.

This is causing problems with how our code provides information to the System Instructions about the file.

Has no one experienced this? We have since attempted heavy verification that this is an issue with OpenAI and not our side. But there is no Down Status on OpenAI’s status page, and I don’t see this exact issue being mentioned anywhere.

To put it simply, an openai.resources.beta.assistants.assistants.Assistant does not have an accurate list of file_ids anymore.

Can you describe the problem again? So you uploaded two files but when you query the api only one shows up? Are you using the API or the playground?

Have you tested your assistant to see if it was able to answer the question for both documents or just one?

So you uploaded two files but when you query the api only one shows up?

Exactly. (In reality we have about 6 files and only 3 are showing up). Specifically the Assistant object’s “file_ids”

Are you using the API or the playground?

We’re using the API. Because OpenAI for some reason doesn’t use the real filenames, and they are helpful for our type of prompts, we call the API to get the filenames and then modify the System instructions to map the filenames to the file IDs.

Have you tested your assistant to see if it was able to answer the question for both documents or just one?

So the assistant does have access to the files, but they’re just named as random strings (the OpenAI File IDs) , and the API doesn’t give the full list of files, so it just sees a bunch of random File IDs and has no idea where to search for the data. But if we manually include the mapping for it, it is able to answer.

Also, if we go into the Assistants tab in the site, we see only the 3 files. But if we go to the Playground, and select the Assistant, all the files show up.

I have one piece of good news for you!

You CAN exactly make sure that the file name is showing when you upload file programmtically! You need to pass a tuple with the file name and the file object

        uploadFile = self.client.files.create( file=(filename,fileContent),purpose='assistants')

Not well documented but yes makes a huge difference. Also - did you notice the ‘show more button’ in the files screen? That can be hard to miss as well.

That is great news! I couldn’t believe they didn’t support that, but I guess they do. Just needed to look deeper in their code, and not the documentation. But I am a bit confused why this isn’t done by default, given that OpenAI seems to store the filenames since I can see the filename in the UI and request it from the API. Will try this out instead though, thank you!

But yes, it’s definitely not a ‘show more’ problem, in some cases it shows 0 files at all.