Parcourir la source

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 il y a 1 an
Parent
révision
b5a2711c05
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2
    2
      agent/component/retrieval.py

+ 2
- 2
agent/component/retrieval.py Voir le fichier

@@ -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))

Chargement…
Annuler
Enregistrer