mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-04 21:06:03 +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",
|
||||
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"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user