🤖 自动格式化代码 [skip ci]
This commit is contained in:
@@ -286,5 +286,4 @@ class ExpressionSelectorProcessor(BaseProcessor):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
init_prompt()
|
init_prompt()
|
||||||
|
|||||||
@@ -21,9 +21,6 @@ import time
|
|||||||
import random
|
import random
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import re
|
import re
|
||||||
from sklearn.feature_extraction.text import TfidfVectorizer
|
|
||||||
from sklearn.metrics.pairwise import cosine_similarity
|
|
||||||
import numpy as np
|
|
||||||
|
|
||||||
logger = get_logger("replyer")
|
logger = get_logger("replyer")
|
||||||
|
|
||||||
@@ -710,5 +707,4 @@ def weighted_sample_no_replacement(items, weights, k) -> list:
|
|||||||
return selected
|
return selected
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
init_prompt()
|
init_prompt()
|
||||||
|
|||||||
@@ -1131,9 +1131,7 @@ class NormalChat:
|
|||||||
start_date = time.strftime("%Y-%m-%d %H:%M", time.localtime(start_time))
|
start_date = time.strftime("%Y-%m-%d %H:%M", time.localtime(start_time))
|
||||||
|
|
||||||
# 获取该段的消息(包含边界)
|
# 获取该段的消息(包含边界)
|
||||||
segment_messages = get_raw_msg_by_timestamp_with_chat_inclusive(
|
segment_messages = get_raw_msg_by_timestamp_with_chat_inclusive(self.stream_id, start_time, end_time)
|
||||||
self.stream_id, start_time, end_time
|
|
||||||
)
|
|
||||||
logger.info(
|
logger.info(
|
||||||
f"[{self.stream_name}] 消息段 {i + 1}: {start_date} - {time.strftime('%Y-%m-%d %H:%M', time.localtime(end_time))}, 消息数: {len(segment_messages)}"
|
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"])
|
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()
|
relationship_manager = get_relationship_manager()
|
||||||
|
|
||||||
# 调用统一的更新方法
|
# 调用统一的更新方法
|
||||||
|
|||||||
@@ -150,7 +150,6 @@ class PromptBuilder:
|
|||||||
style_habbits_str = "\n".join(style_habbits)
|
style_habbits_str = "\n".join(style_habbits)
|
||||||
grammar_habbits_str = "\n".join(grammar_habbits)
|
grammar_habbits_str = "\n".join(grammar_habbits)
|
||||||
|
|
||||||
|
|
||||||
memory_prompt = ""
|
memory_prompt = ""
|
||||||
|
|
||||||
if global_config.memory.enable_memory:
|
if global_config.memory.enable_memory:
|
||||||
|
|||||||
Reference in New Issue
Block a user