Procházet zdrojové kódy

fix: uninitialized variable error on empty knowledge retrieval(agent) (#20025)

Co-authored-by: crazywoola <427733928@qq.com>
tags/1.4.1
zhudongwork před 5 měsíci
rodič
revize
adca981eee
Žádný účet není propojen s e-mailovou adresou tvůrce revize

+ 2
- 1
api/core/tools/utils/dataset_retriever/dataset_retriever_tool.py Zobrazit soubor

@@ -125,6 +125,7 @@ class DatasetRetrieverTool(DatasetRetrieverBaseTool):
return ""
# get retrieval model , if the model is not setting , using default
retrieval_model: dict[str, Any] = dataset.retrieval_model or default_retrieval_model
retrieval_resource_list = []
if dataset.indexing_technique == "economy":
# use keyword table query
documents = RetrievalService.retrieve(
@@ -181,7 +182,7 @@ class DatasetRetrieverTool(DatasetRetrieverBaseTool):
score=record.score,
)
)
retrieval_resource_list = []
if self.return_resource:
for record in records:
segment = record.segment

Načítá se…
Zrušit
Uložit