From 265646ded332de540073ea4e94ce45a5c00485da Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 15 Jun 2023 15:08:04 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(chat.py):=20change=20the=20p?= =?UTF-8?q?refix=20of=20the=20error=20message=20to=20'data'=20to=20fix=20t?= =?UTF-8?q?he=20server=20response=20The=20error=20message=20prefix=20was?= =?UTF-8?q?=20changed=20from=20'data'=20to=20'error'=20to=20fix=20the=20se?= =?UTF-8?q?rver=20response.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/api/v1/chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/langflow/api/v1/chat.py b/src/backend/langflow/api/v1/chat.py index 18f547682..5943f6f78 100644 --- a/src/backend/langflow/api/v1/chat.py +++ b/src/backend/langflow/api/v1/chat.py @@ -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"