refactor: brain memory

This commit is contained in:
莘权 马 2023-09-07 23:58:30 +08:00
parent f4eea02866
commit 20fb71b0a3

View file

@ -216,9 +216,9 @@ class BrainMemory(pydantic.BaseModel):
logger.debug(f"summary rsp: {response}")
return response
async def get_title(self, text: str, llm, max_words=5, **kwargs) -> str:
async def get_title(self, llm, max_words=5, **kwargs) -> str:
"""Generate text title"""
summary = await self.summarize(text, max_words=500)
summary = await self.summarize(max_words=500)
language = CONFIG.language or DEFAULT_LANGUAGE
command = f"Translate the above summary into a {language} title of less than {max_words} words."