diff --git a/src/chat/focus_chat/info_processors/relationship_processor.py b/src/chat/focus_chat/info_processors/relationship_processor.py index e2200a418..591a4a05e 100644 --- a/src/chat/focus_chat/info_processors/relationship_processor.py +++ b/src/chat/focus_chat/info_processors/relationship_processor.py @@ -222,7 +222,7 @@ class RelationshipProcessor(BaseProcessor): "start_time": time.time(), "forget": False, }) - if len(self.info_fetching_cache) > 30: + if len(self.info_fetching_cache) > 20: self.info_fetching_cache.pop(0) else: logger.warning(f"{self.log_prefix} 未找到用户 {person_name} 的ID,跳过调取信息。") diff --git a/src/chat/focus_chat/planners/planner_simple.py b/src/chat/focus_chat/planners/planner_simple.py index 9fea4cebe..d48347142 100644 --- a/src/chat/focus_chat/planners/planner_simple.py +++ b/src/chat/focus_chat/planners/planner_simple.py @@ -181,7 +181,7 @@ class ActionPlanner(BasePlanner): prompt = f"{prompt}" llm_content, (reasoning_content, _) = await self.planner_llm.generate_response_async(prompt=prompt) - logger.info(f"{self.log_prefix}规划器原始提示词: {prompt}") + # logger.info(f"{self.log_prefix}规划器原始提示词: {prompt}") logger.info(f"{self.log_prefix}规划器原始响应: {llm_content}") logger.info(f"{self.log_prefix}规划器推理: {reasoning_content}") diff --git a/src/chat/focus_chat/replyer/default_replyer.py b/src/chat/focus_chat/replyer/default_replyer.py index 255cb6e25..0b4b8c655 100644 --- a/src/chat/focus_chat/replyer/default_replyer.py +++ b/src/chat/focus_chat/replyer/default_replyer.py @@ -372,7 +372,7 @@ class DefaultReplyer: # 使用相似度匹配选择最相似的表达 similar_exprs = find_similar_expressions(target_message, learnt_style_expressions, 3) for expr in similar_exprs: - print(f"expr: {expr}") + # print(f"expr: {expr}") if isinstance(expr, dict) and "situation" in expr and "style" in expr: style_habbits.append(f"当{expr['situation']}时,使用 {expr['style']}") # 2. learnt_grammar_expressions加权随机选2条 @@ -390,6 +390,8 @@ class DefaultReplyer: style_habbits_str = "\n".join(style_habbits) grammar_habbits_str = "\n".join(grammar_habbits) + + # 关键词检测与反应 keywords_reaction_prompt = ""