diff --git a/api/chat_routes.py b/api/chat_routes.py index bd3a81f..9d076f4 100644 --- a/api/chat_routes.py +++ b/api/chat_routes.py @@ -1650,7 +1650,8 @@ def select_images(contexts: List[Dict], query: str) -> List[Dict]: existing_ids = {img['id'] for img in scored_images} if img_id and img_id not in existing_ids: # 为关联图片计算分数(继承主表格分数,略低) - assoc_score = s - 1.0 if s >= MIN_SCORE else MIN_SCORE - 1.0 + ctx_score = ctx.get("score", 0) + assoc_score = ctx_score - 1.0 if ctx_score >= MIN_SCORE else MIN_SCORE - 1.0 if assoc_score >= MIN_SCORE: scored_images.append({ 'score': assoc_score,