mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-07 19:34:04 +00:00
feat:mapreduce summary
This commit is contained in:
parent
de90244828
commit
67f41559a8
@ -578,10 +578,12 @@ class KnowledgeService:
|
|||||||
from pilot.common.chat_util import llm_chat_response_nostream
|
from pilot.common.chat_util import llm_chat_response_nostream
|
||||||
import uuid
|
import uuid
|
||||||
tasks = []
|
tasks = []
|
||||||
|
max_iteration = 5
|
||||||
if len(docs) == 1:
|
if len(docs) == 1:
|
||||||
summary = self._llm_extract_summary(doc=docs[0])
|
summary = self._llm_extract_summary(doc=docs[0])
|
||||||
return summary
|
return summary
|
||||||
else:
|
else:
|
||||||
|
max_iteration = max_iteration if len(docs) > max_iteration else len(docs)
|
||||||
for doc in docs:
|
for doc in docs:
|
||||||
chat_param = {
|
chat_param = {
|
||||||
"chat_session_id": uuid.uuid1(),
|
"chat_session_id": uuid.uuid1(),
|
||||||
|
Loading…
Reference in New Issue
Block a user