Skip to content

Commit

Permalink
queued fix
Browse files Browse the repository at this point in the history
  • Loading branch information
phact committed May 10, 2024
1 parent 471b589 commit 07b602a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions impl/routes/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ async def run_event_stream(run, message_id, astradb):
# copy run
run_holder = RunObject(**run.dict())
run_holder.required_action = None
run_holder.status = "created"
event = AssistantStreamEvent(data=run_holder, event=f"thread.run.{run_holder.status}")
run_holder.status = "queued"
event = AssistantStreamEvent(data=run_holder, event=f"thread.run.created") # yes the event is created and the run is queued, that's how it goes
event_json = event.json()
yield f"data: {event_json}\n\n"
run_holder.status = "queued"
Expand Down

0 comments on commit 07b602a

Please sign in to comment.