diff --git a/src/chat/focus_chat/info_processors/expression_selector_processor.py b/src/chat/focus_chat/info_processors/expression_selector_processor.py index cec87f0fb..3791bf3e4 100644 --- a/src/chat/focus_chat/info_processors/expression_selector_processor.py +++ b/src/chat/focus_chat/info_processors/expression_selector_processor.py @@ -286,5 +286,4 @@ class ExpressionSelectorProcessor(BaseProcessor): return [] - init_prompt() diff --git a/src/chat/focus_chat/replyer/default_generator.py b/src/chat/focus_chat/replyer/default_generator.py index e6322f105..8bed42543 100644 --- a/src/chat/focus_chat/replyer/default_generator.py +++ b/src/chat/focus_chat/replyer/default_generator.py @@ -21,9 +21,6 @@ import time import random from datetime import datetime import re -from sklearn.feature_extraction.text import TfidfVectorizer -from sklearn.metrics.pairwise import cosine_similarity -import numpy as np logger = get_logger("replyer") @@ -710,5 +707,4 @@ def weighted_sample_no_replacement(items, weights, k) -> list: return selected - init_prompt() diff --git a/src/chat/normal_chat/normal_chat.py b/src/chat/normal_chat/normal_chat.py index fcf542372..e1b5def95 100644 --- a/src/chat/normal_chat/normal_chat.py +++ b/src/chat/normal_chat/normal_chat.py @@ -1131,9 +1131,7 @@ class NormalChat: start_date = time.strftime("%Y-%m-%d %H:%M", time.localtime(start_time)) # 获取该段的消息(包含边界) - segment_messages = get_raw_msg_by_timestamp_with_chat_inclusive( - self.stream_id, start_time, end_time - ) + segment_messages = get_raw_msg_by_timestamp_with_chat_inclusive(self.stream_id, start_time, end_time) logger.info( f"[{self.stream_name}] 消息段 {i + 1}: {start_date} - {time.strftime('%Y-%m-%d %H:%M', time.localtime(end_time))}, 消息数: {len(segment_messages)}" ) @@ -1162,7 +1160,9 @@ class NormalChat: # 按时间排序所有消息(包括间隔标识) processed_messages.sort(key=lambda x: x["time"]) - logger.info(f"[{self.stream_name}] 为 {person_id} 获取到总共 {len(processed_messages)} 条消息(包含间隔标识)用于印象更新") + logger.info( + f"[{self.stream_name}] 为 {person_id} 获取到总共 {len(processed_messages)} 条消息(包含间隔标识)用于印象更新" + ) relationship_manager = get_relationship_manager() # 调用统一的更新方法 diff --git a/src/chat/normal_chat/normal_prompt.py b/src/chat/normal_chat/normal_prompt.py index 2ddab4111..96546c582 100644 --- a/src/chat/normal_chat/normal_prompt.py +++ b/src/chat/normal_chat/normal_prompt.py @@ -150,7 +150,6 @@ class PromptBuilder: style_habbits_str = "\n".join(style_habbits) grammar_habbits_str = "\n".join(grammar_habbits) - memory_prompt = "" if global_config.memory.enable_memory: