Merge branch 'MaiM-with-u:dev' into dev

This commit is contained in:
UnCLAS-Prommer
2025-05-28 23:23:41 +08:00
committed by GitHub
5 changed files with 83 additions and 57 deletions

View File

@@ -204,7 +204,8 @@ class ExpressionLearner:
random_msg: Optional[List[Dict[str, Any]]] = get_raw_msg_by_timestamp_random(
current_time - 3600 * 24, current_time, limit=num
)
if not random_msg:
# print(random_msg)
if not random_msg or random_msg == []:
return None
# 转化成str
chat_id: str = random_msg[0]["chat_id"]
@@ -216,7 +217,7 @@ class ExpressionLearner:
chat_str=random_msg_str,
)
# logger.info(f"学习{type_str}的prompt: {prompt}")
logger.info(f"学习{type_str}的prompt: {prompt}")
try:
response, _ = await self.express_learn_model.generate_response_async(prompt)

View File

@@ -399,7 +399,7 @@ class MemoryManager:
try:
# 调用LLM修改总结、概括和要点
response, _ = await self.llm_summarizer.generate_response_async(prompt)
logger.info(f"精简记忆响应: {response}")
logger.debug(f"精简记忆响应: {response}")
# 使用repair_json处理响应
try:
# 修复JSON格式