Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: answer returned null when response_mode was blocking (#1133)

takatost2658c4d57be8
diff --git a/api/services/completion_service.py b/api/services/completion_service.py
index 3c05e99c9ea..531d803f547 100644
--- a/api/services/completion_service.py
+++ b/api/services/completion_service.py
@@ -367,7 +367,7 @@ class CompletionService:
result = json.loads(result)
if result.get('error'):
cls.handle_error(result)
- if 'data' in result:
+ if result['event'] == 'message' and 'data' in result:
return cls.get_message_response_data(result.get('data'))
except ValueError as e:
if e.args[0] != "I/O operation on closed file.": # ignore this error