update:1.新增统一的JSON清洗和重试方法,避免AI响应json格式错误 2.重构提示词模板命名,优化大纲章节初始化提示词 3.移除布冯冗余代码,提高代码复用性 4.优化系统默认写作风格预设提示词和规则

This commit is contained in:
xiamuceer
2025-12-14 15:21:52 +08:00
parent 86b73e85fb
commit 24b0a09b43
11 changed files with 633 additions and 1851 deletions
+3 -1
View File
@@ -205,7 +205,9 @@ class MCPTestService:
if isinstance(test_arguments, str):
try:
test_arguments = json.loads(test_arguments)
# 使用统一的JSON清洗方法
cleaned_args = ai_service._clean_json_response(test_arguments)
test_arguments = json.loads(cleaned_args)
except json.JSONDecodeError as e:
logger.error(f"❌ 解析AI参数失败: {e}")
return MCPTestResult(