mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
fix issue: query is none when doing retrieval (#10129)
This commit is contained in:
parent
ae3482e0b4
commit
1b645c1cc9
|
@ -34,6 +34,8 @@ class RetrievalService:
|
||||||
reranking_mode: Optional[str] = "reranking_model",
|
reranking_mode: Optional[str] = "reranking_model",
|
||||||
weights: Optional[dict] = None,
|
weights: Optional[dict] = None,
|
||||||
):
|
):
|
||||||
|
if not query:
|
||||||
|
return []
|
||||||
dataset = db.session.query(Dataset).filter(Dataset.id == dataset_id).first()
|
dataset = db.session.query(Dataset).filter(Dataset.id == dataset_id).first()
|
||||||
if not dataset:
|
if not dataset:
|
||||||
return []
|
return []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user