From f1dc29f43921802a6759b21ae93959e176b6ef84 Mon Sep 17 00:00:00 2001 From: Yuzhiran Dev Date: Mon, 1 Jun 2026 14:35:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(llm):=20=E5=88=86=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E4=B8=8D=E5=90=8C=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - nvidia 激活、模型改为 step-3.7-flash → 用于日常生成/采集/优化等 - compliance_optimizer.py 显式指定 provider=sensenova → 合规审查走 deepseek-v4-flash - _FALLBACK 同步更新为 step-3.7-flash - 管理后台标签同步更新 --- platform/backend/app/core/nvidia_client.py | 2 +- platform/frontend/admin.html | 2 +- scripts/compliance_optimizer.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/backend/app/core/nvidia_client.py b/platform/backend/app/core/nvidia_client.py index db90ca2..b17f5c8 100644 --- a/platform/backend/app/core/nvidia_client.py +++ b/platform/backend/app/core/nvidia_client.py @@ -30,7 +30,7 @@ _API_KEYS = { # 代码级回退默认值(实际配置优先从 DB 读取) _FALLBACK = { "opencode-go": {"base_url": "https://opencode.ai/zen/go/v1", "model": "deepseek-v4-flash"}, - "nvidia": {"base_url": "https://integrate.api.nvidia.com/v1", "model": "stepfun-ai/step-3.5-flash"}, + "nvidia": {"base_url": "https://integrate.api.nvidia.com/v1", "model": "stepfun-ai/step-3.7-flash"}, "sensenova": {"base_url": "https://token.sensenova.cn/v1", "model": "deepseek-v4-flash"}, } diff --git a/platform/frontend/admin.html b/platform/frontend/admin.html index c5ef28e..4c9a412 100644 --- a/platform/frontend/admin.html +++ b/platform/frontend/admin.html @@ -608,7 +608,7 @@ - + diff --git a/scripts/compliance_optimizer.py b/scripts/compliance_optimizer.py index 551be62..d76e068 100644 --- a/scripts/compliance_optimizer.py +++ b/scripts/compliance_optimizer.py @@ -182,7 +182,7 @@ def polish_with_llm(html: str, platform: str, remaining_issues: Optional[List[Di prompt = get_prompt("compliance_fix", issues_desc=issues_desc, html=html) else: prompt = get_prompt("compliance_polish", html=html) - polished = call_llm(prompt, provider=None, temperature=temperature, max_tokens=max_tokens, system_prompt=system_prompt) + polished = call_llm(prompt, provider="sensenova", temperature=temperature, max_tokens=max_tokens, system_prompt=system_prompt) polished = clean_html_content(polished) polished = strip_ai_preface(polished) polished = strip_thinking_html(polished)