79141385

Date: 2024-10-30 13:54:17
Score: 1.5
Natty:
Report link

I'm noticing that you set your variable results twice:

results = client.beta.threads.messages.create(
  thread_id = thread.id,
  role = "user",
  content = question
)

So the content of your first results variable should be the output you see in your second run.

Then you have:

while run.status not in ["completed", "failed"]:

But you only set a new value for results if the status is completed. That makes me fairly confident your second run had status as failed. I can't tell you why it failed because you didn't print any of the logs from the assistant. Could you try printing client.beta.threads.messages.list(thread_id=thread.id)?

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Marshall K