{% if params_kw.id %} {% set llmid = params_kw.id %} { "widgettype": "VBox", "options": { "width": "100%", "height": "100%", "spacing": 10 }, "subwidgets": [ { "widgettype": "Title", "options": { "text": "模型上线检查", "level": 2 } }, { "widgettype": "Text", "options": { "name": "check_status", "text": "检查中...", "i18n": false } }, { "widgettype": "VBox", "options": { "name": "checks_list", "spacing": 5 } }, { "widgettype": "Button", "options": { "name": "test_btn", "text": "体验一次", "i18n": false, "disabled": true } }, { "widgettype": "Text", "options": { "name": "test_result", "text": "", "i18n": false } }, { "widgettype": "Button", "options": { "name": "check_charging_btn", "text": "检查计费", "i18n": false, "disabled": true } }, { "widgettype": "Text", "options": { "name": "charging_result", "text": "", "i18n": false } } ], "binds": [ { "wid": "self", "event": "load", "actiontype": "script", "target": "self", "script": "var resp = await fetch('{{entire_url('./api/llm_launch_check_api.dspy')}}?llmid={{llmid}}&action=check'); var data = await resp.json(); var statusEl = this.getWidgetByName('check_status'); var listEl = this.getWidgetByName('checks_list'); if(data.error) { statusEl.set_text('错误: ' + data.error); return; } var html = ''; var allOk = true; (data.checks||[]).forEach(function(c){ var icon = c.passed ? '✅' : '❌'; if(!c.passed) allOk = false; html += '