fixbug: summary too long

This commit is contained in:
莘权 马 2023-09-02 21:48:23 +08:00
parent 2647995411
commit 5980b08c80

View file

@ -123,7 +123,7 @@ class Assistant(Role):
return None
if history_text == "":
return last_talk
history_summary = await self._llm.get_context_title(history_text, max_token_count_per_ask=1000, max_words=500)
history_summary = await self._llm.get_summary(history_text, max_words=500)
if last_talk and await self._llm.is_related(last_talk, history_summary): # Merge relevant content.
last_talk = await self._llm.rewrite(sentence=last_talk, context=history_text)
return last_talk