Assistant run status is always in queued

Hi there, i am trying to use the assistant. I actually have this code, and for some reason the status is always “queued”. Any help please?

my_thread = client.beta.threads.create()
my_thread_message = client.beta.threads.messages.create(,
    content="would you explain the meaning of happiness?",

my_run = client.beta.threads.runs.create(,,

while my_run.status in ["queued", "in_progress"]:
        keep_retrieving_run = client.beta.threads.runs.retrieve(
if keep_retrieving_run.status == "completed":
            all_messages = client.beta.threads.messages.list(
            Respuesta =[0].content[0].text.value

Have you funded the account with real money and can make successful calls to chat completions?

Hi Thanks for your help, yes, i do have money and i am using the api key with completions in other projects …

have you tried client.beta.threads.runs.create_and_poll? Refer

1 Like

hi wellswang, yeah that worked!!! thank so much!

1 Like