fix: 移除 response_format=json_object,改为依赖 prompt 约束
回退上一条推断式修复(模型名匹配没有官方依据)。 改为在 script_service 调用层直接移除该参数: - system prompt 已明确要求'只输出纯 JSON' - safe_parse_ai_json_response 已做容错解析和 markdown 清洗 - 不依赖特定模型对 response_format 的支持
This commit is contained in:
@@ -71,13 +71,13 @@ class ScriptService:
|
||||
)
|
||||
|
||||
# 调用 AI 生成
|
||||
# 注意:system prompt 中已要求"只输出纯 JSON",不依赖 response_format 参数
|
||||
result = await model_router.generate(
|
||||
prompt=user_prompt,
|
||||
system_prompt=system_prompt,
|
||||
model_id=model,
|
||||
task_type="script",
|
||||
temperature=0.7,
|
||||
response_format="json_object",
|
||||
)
|
||||
|
||||
if not result.content or not result.content.strip():
|
||||
|
||||
Reference in New Issue
Block a user