update:1.新增统一的JSON清洗和重试方法,避免AI响应json格式错误 2.重构提示词模板命名,优化大纲章节初始化提示词 3.移除布冯冗余代码,提高代码复用性 4.优化系统默认写作风格预设提示词和规则
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user