6 lines
456 B
Plaintext
6 lines
456 B
Plaintext
# update_llm_model.dspy — 薄封装:走模块 helper(JSON字段校验)
|
||
r = json.loads(await update_llm_model(dict(params_kw or {})))
|
||
if r.get('success'):
|
||
return {"widgettype": "Message", "options": {"title": "Success", "message": r.get('message') or 'ok', "timeout": 3, "cwidth": 16, "cheight": 9}}
|
||
return {"widgettype": "Error", "options": {"title": "Error", "message": r.get('message') or 'failed', "timeout": 3, "cwidth": 16, "cheight": 9}}
|