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(
thread_id=my_thread.id,
role="user",
content="would you explain the meaning of happiness?",
)
my_run = client.beta.threads.runs.create(
thread_id=my_thread.id,
assistant_id=my_assistant_Novakorp.id,
)
while my_run.status in ["queued", "in_progress"]:
keep_retrieving_run = client.beta.threads.runs.retrieve(
thread_id=my_thread.id,
run_id=my_run.id
)
if keep_retrieving_run.status == "completed":
all_messages = client.beta.threads.messages.list(
thread_id=my_thread.id
)
Respuesta = all_messages.data[0].content[0].text.value