From be1e1cb1603b3e3eb7478f944d0a140b5da19379 Mon Sep 17 00:00:00 2001 From: aries_ckt <916701291@qq.com> Date: Tue, 31 Oct 2023 19:38:20 +0800 Subject: [PATCH] feat:document summary set max iteration --- pilot/server/knowledge/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pilot/server/knowledge/service.py b/pilot/server/knowledge/service.py index 0b6e260dc..7e899ba78 100644 --- a/pilot/server/knowledge/service.py +++ b/pilot/server/knowledge/service.py @@ -584,7 +584,7 @@ class KnowledgeService: return summary else: max_iteration = max_iteration if len(docs) > max_iteration else len(docs) - for doc in docs: + for doc in docs[0:max_iteration]: chat_param = { "chat_session_id": uuid.uuid1(), "current_user_input": doc,