Assistant unable to access files

Hi all.
Since friday, my assistants are unable to access the files I load into them.

Both when I run it through some code or through the playground, I get the same results.
Is it an issue on my end or other people are experiencing this ?

Below are a screenshot of my playground + basic code i used to test for an assistant

import os
import openai
import time
from pprint import pprint

load_dotenv()
api_key = os.environ["OPENAI_API_KEY"]
# Initialize the client
client = openai.OpenAI()


file_path = "/path/to/company.pdf"
read_mode = "rb"

file = client.files.create(
    file=open(file_path, read_mode),
    purpose="assistants",
)

#  Create an Assistant (Note model="gpt-3.5-turbo-1106" instead of "gpt-4-1106-preview")
assistant = client.beta.assistants.create(
    name="Infos retrieval assistant",
    instructions="From the document, find some key infos about the company. Your answer should fit in max 100 words",
    model="gpt-3.5-turbo-1106",
    tools=[{"type": "retrieval"}],
    file_ids=[file.id],
)

thread = client.beta.threads.create()

message = client.beta.threads.messages.create(
    thread_id=thread.id,
    role="user",
    content="Get me the key infos about the company from the document",
)

run = client.beta.threads.runs.create(
    thread_id=thread.id,
    assistant_id=assistant.id,
    instructions="Please address the user as mister Paul, and read the document to find the key infos about the company",
)
print(run.model_dump_json(indent=4))

i = 0
old_msg = ""
while True:
    i += 2
    run_status = client.beta.threads.runs.retrieve(thread_id=thread.id, run_id=run.id)
    print(f"\n>> {i}s ...")
    # thread_messages = client.beta.threads.messages.list(thread_id=thread.id)
    # for msg in thread_messages.data:
    #     if msg.role == "assistant" and msg.content[0].text != old_msg:
    #         pprint(msg.content[0].text.value)
    #         old_msg = msg.content[0].text.value
    time.sleep(1)
    if run_status.status == "completed":
        messages = client.beta.threads.messages.list(thread_id=thread.id)
        pprint(messages)
        break
    else:
        time.sleep(1)

3 Likes

go to playground and find your files. they have to upload. I ran to a similar issue the first time around, had to wait a few minutes before it worked. When I came back from a confused coffee break I saw that I had uploaded a few files and now the agents were working.

I having the same issue the assistant won’t read files in its KB anymore tested with PDF, DOC, and text, I have deleted and uplaoded many times nothing seems to work, please help!

All my files are accessible through the OpenAI files platform after running client.files.create(file=open(file_path, read_mode), purpose="assistants") and my assistants used to work fine before friday.
I deleted all the assistants I created earlier (more than 200) and all the files too (around 300).
But it still doesn’t work :frowning:

1 Like

The AI is also telling me my files are broken! I think it’s on OpenAI’s side

1 Like

I have the same issue as of today - the files are uploading fine, the file bytes are there and the file id comes back but the assistant can no longer retrieve the files.

Tried multiple times with the same result.

I believe this is a bug, which lots of users are experiencing. Try using pdf

Same here, right now I cannot use it at all. It should be a patch to fix this bug as soon as possible.

Same we are also facing this exact same problems and we have tried many configurations and uploaded files in different formats as well but nothing seems to work.

I got it to work briefly after it not working, now its not working at all, only I’m using files for GPTs.

I have the same problem with both assistants and ChatGPT plus GPT’s. Files initially work and then shortly get corrupted or they cant be accessed.

I have reuploaded them but the problem comes again shortly. This is quite frustrating as it seems to randomly break down. Happens with all file types.

How is it possible that only us are having this issue? Since so many people are using openai API key for this use case this problem should be well known at this point… I haven’t found any other references of peolple having this issue.
I have a chatbot to test for customer and I don’t know what to do…

Good question elegantprompt. Could it be some geographical area or users assigned to certain resources or endpoint?

I live in Europe, Italy. SamT good observation it is unlikely but Maybe only a problem for certain geo-related endpoints. Anyone else having the same issue from Europe?

I’m from Italy too, I have this same problem with my gpts, “error searching knowledge”.

I am from Pakistan and we have the same issue.

Europe. Sometime It’s working fine, but randomly breaking. Anyone contact support team?

1 Like

Europe as well. Haven’t contacted official support yet.

I contacted them but haven’t received a response .

This is a problem though the API is very often buggy and is a nightmare to work like this… The main issue for me is to explain to the customers that is an openai problem every time not my foult but it happens too often…
I am starting to look like I am unable to do my job.