From e4733ab495aba33be7584ac32cda6d9e6f6d9101 Mon Sep 17 00:00:00 2001 From: Mavis Date: Thu, 11 Jun 2026 23:25:05 +0800 Subject: [PATCH] =?UTF-8?q?style(ai):=20=E6=8F=92=E5=9B=BE=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=B0=BA=E5=AF=B8=20768x512=20=E2=86=92=20512x384(?= =?UTF-8?q?=E6=9B=B4=E7=9C=81=20CDN=20=E6=B5=81=E9=87=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 512x384 是 4:3 经典比例,后端 DEFAULT_IMAGE_SIZE 常量值。 老文章(已 enrich)的 image_ai_url 仍是 768x512 不会自动变; 新 enrich 走 512x384。Setting.image_size 字段保留(用户在 UI 改生效), 但默认行为不依赖它,避免被改大。 --- backend/app/services/llm/enrichment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/services/llm/enrichment.py b/backend/app/services/llm/enrichment.py index bef0456..fc05796 100644 --- a/backend/app/services/llm/enrichment.py +++ b/backend/app/services/llm/enrichment.py @@ -60,7 +60,7 @@ DIARY_PARA_CLASS = "diary-para" # === 插图默认尺寸(适中,不再用 1024x768)=== # 写死到 enrichment 里,行为稳定;setting.image_size 仍可由用户在 UI 改, # 但默认行为不依赖它,避免意外被改成很大。 -DEFAULT_IMAGE_SIZE = "768x512" +DEFAULT_IMAGE_SIZE = "512x384" DEFAULT_IMAGE_FIRST_PARA_CHARS = 400 # 提取第一段最多用这么多字 DEFAULT_IMAGE_MAX_TAGS = 5 # 分类标签上限(多标签)