pull/937/head
114514 2025-05-09 18:39:59 +08:00
parent b998d7a05b
commit 35f0c8224e
1 changed files with 3 additions and 1 deletions

View File

@ -50,12 +50,14 @@ async def find_most_relevant_historical_message(
return None
current_timestamp = time.time() # 获取当前时间戳
excluded_time_threshold = current_timestamp - exclude_recent_seconds
pipeline = [
{
"$match": {
"chat_id": chat_id,
"embedding_vector": {"$exists": True, "$ne": None, "$not": {"$size": 0}}
"embedding_vector": {"$exists": True, "$ne": None, "$not": {"$size": 0}},
"time": {"$lt": excluded_time_threshold}
}
},
{