fix: 修复llm_launch_check_page.dspy缩进和错误处理

This commit is contained in:
Hermes Agent 2026-06-16 15:46:16 +08:00
parent 5deecc67ce
commit 75fe89ac2e

View File

@ -2,8 +2,7 @@
# 服务端渲染模型上线检查页面输出bricks widget JSON # 服务端渲染模型上线检查页面输出bricks widget JSON
# 所有检查在服务端async执行结果直接嵌入widget # 所有检查在服务端async执行结果直接嵌入widget
import html as html_mod try:
llmid = params_kw.get('id', '') llmid = params_kw.get('id', '')
if not llmid: if not llmid:
@ -159,3 +158,13 @@ widget = {
} }
return json.dumps(widget, ensure_ascii=False) return json.dumps(widget, ensure_ascii=False)
except Exception as e:
return json.dumps({
"widgettype": "VBox",
"options": {"width": "100%", "height": "100%", "spacing": 10},
"subwidgets": [
{"widgettype": "Title", "options": {"text": "模型上线检查", "level": 2}},
{"widgettype": "Text", "options": {"text": f"执行错误: {format_exc()}", "i18n": False}}
]
}, ensure_ascii=False)