Skip to content

Commit

Permalink
streaming update:fix last event
Browse files Browse the repository at this point in the history
  • Loading branch information
f1delius committed Apr 19, 2024
1 parent c93fbb1 commit 6771afe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ async def stream_json_response_with_auth(api_url, api_key, msg_data, agent, thre

# Print the complete message for the last event
if prev_event is not None:
prev_data = prev_data.replace("````","`\n```")
prev_data = prev_data.replace("```", "\n```")
print(f'Event: {prev_event}, Data: {prev_data}')
await send_agent_message(agent[prev_event], thread_id, reply_id, prev_data, room_id)
else:
Expand Down

0 comments on commit 6771afe

Please sign in to comment.