fix:修复reply导致的异常空跳

This commit is contained in:
SengokuCola
2025-07-25 13:45:16 +08:00
parent 3495926f55
commit 5251905744
5 changed files with 21 additions and 109 deletions

View File

@@ -419,7 +419,7 @@ class RelationshipBuilder:
async def update_impression_on_segments(self, person_id: str, chat_id: str, segments: List[Dict[str, Any]]):
"""基于消息段更新用户印象"""
original_segment_count = len(segments)
logger.info(f"开始为 {person_id} 基于 {original_segment_count} 个消息段更新印象")
logger.debug(f"开始为 {person_id} 基于 {original_segment_count} 个消息段更新印象")
try:
# 筛选要处理的消息段每个消息段有10%的概率被丢弃
segments_to_process = [s for s in segments if random.random() >= 0.1]
@@ -432,7 +432,7 @@ class RelationshipBuilder:
dropped_count = original_segment_count - len(segments_to_process)
if dropped_count > 0:
logger.info(f"{person_id} 随机丢弃了 {dropped_count} / {original_segment_count} 个消息段")
logger.debug(f"{person_id} 随机丢弃了 {dropped_count} / {original_segment_count} 个消息段")
processed_messages = []