Преглед на файлове

Fix agent retrieval nothing (#2283)

### What problem does this PR solve?

Fix agent retrieval nothing

### Type of change

- [✓] Bug Fix (non-breaking change which fixes an issue)
tags/v0.11.0
wwwlll преди 1 година
родител
ревизия
b5a2711c05
No account linked to committer's email address
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2
    2
      agent/component/retrieval.py

+ 2
- 2
agent/component/retrieval.py Целия файл

@@ -54,8 +54,8 @@ class Retrieval(ComponentBase, ABC):
for role, cnt in history[::-1][:self._param.message_history_window_size]:
if role != "user":continue
query.append(cnt)
query = "\n".join(query)
# query = "\n".join(query)
query = query[0]
kbs = KnowledgebaseService.get_by_ids(self._param.kb_ids)
if not kbs:
raise ValueError("Can't find knowledgebases by {}".format(self._param.kb_ids))

Loading…
Отказ
Запис