mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-20 01:10:59 +00:00
feat(dify): throw error event (#1251)
This commit is contained in:
committed by
GitHub
parent
629ebae0e9
commit
23a0dba470
@@ -225,6 +225,8 @@ class DifyServiceAPIRunner(runner.RequestRunner):
|
|||||||
role="assistant",
|
role="assistant",
|
||||||
content=[llm_entities.ContentElement.from_image_url(image_url)],
|
content=[llm_entities.ContentElement.from_image_url(image_url)],
|
||||||
)
|
)
|
||||||
|
if chunk['event'] == 'error':
|
||||||
|
raise errors.DifyAPIError("dify 服务错误: " + chunk['message'])
|
||||||
|
|
||||||
query.session.using_conversation.uuid = chunk["conversation_id"]
|
query.session.using_conversation.uuid = chunk["conversation_id"]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user