🐛 fix(chat.py): change the prefix of the error message to 'data' to fix the server response
The error message prefix was changed from 'data' to 'error' to fix the server response.
This commit is contained in:
parent
03076b3577
commit
265646ded3
1 changed files with 1 additions and 1 deletions
|
|
@ -109,7 +109,7 @@ async def stream_build(flow_id: str):
|
|||
chat_manager.set_cache(flow_id, graph.build())
|
||||
except Exception as exc:
|
||||
logger.error("Error while building the flow: %s", exc)
|
||||
yield f"data: {json.dumps({'error': str(exc)})}\n\n"
|
||||
yield f"error: {json.dumps({'error': str(exc)})}\n\n"
|
||||
finally:
|
||||
yield f"data: {final_response}\n\n"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue