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: query empty not allow (#255)

John Wangccd80653ffe2
diff --git a/api/services/completion_service.py b/api/services/completion_service.py
index f94cd23d3e1..25be1ff6535 100644
--- a/api/services/completion_service.py
+++ b/api/services/completion_service.py
@@ -33,6 +33,10 @@ class CompletionService:
# is streaming mode
inputs = args['inputs']
query = args['query']
+
+ if not query:
+ raise ValueError('query is required')
+
conversation_id = args['conversation_id'] if 'conversation_id' in args else None
conversation = None