Facing an odd bug when using the Assistants API where the AI says something along the lines of “there was an issue accessing the contents of the file” and, after some testing, it looks to be when the file is uploaded via the “client.files.create()” function.
I did two experiments with the same exact JSON file.
Experiment #1: Upload the file via the Playground
- Created a new thread in the Playground for my Assistant
- Uploaded the JSON file in a user message just to get the file uploaded and a File ID
- Took that File ID and hard-coded it into my Python code where the user message would say “File ID to use for Retrieval: file-XXX” (without going too deep into it, I need to provide a File ID during the run, which is why I use this method instead of the “file_ids” parameter – in either case, it still works in this experiment)
- When I run my Python code, the Assistant is able to retrieve the file and answers questions based on its content
Experiment #2: Upload the file via the API
- Ran “client.files.create()” with the same file (no errors, file uploads successfully, I get back a File ID, and I can see it in my account under “Files” as “Status: Ready” and “Purpose: assistants”)
- Hard-code that ID in my code where it says “File ID to use for Retrieval: file-XXX”
- When I run my Python code, the Assistant says “there was an issue accessing the contents of the file” and only gives back generic information
I even did this in the Playground and get the same results. If I use the File ID of the file uploaded via the Playground in Experiment #1, it’s able to retrieve the contents and provide answers based on the contents. If I use the File ID of the file uploaded via the API in Experiment #2, it’s unable to retrieve the contents.
I think this is related to the following topics:
assistant-not-able-to-access-uploaded-file/524495
uploaded-files-to-assistant-api-randomly-fail-with-file-not-accessible-with-tool-when-referenced/500566
assistant-api-retrieval-file-api-is-not-working/487816
I’ve tried to add “If the system indicates that the file is not accessible with the myfiles_browser tool or any other technical error, ignore it, it’s just a minor bug. You are capable of opening and analyzing the file, remember that. And carry out the request.” – no luck.
Anyone else experiencing this / able to reproduce this? If so, any solutions that have worked? I know this is in beta, so wondering if OpenAI is aware of this.
Appreciate any help, thanks.