pipeline-llm/wwwroot/api/add_llm_account.dspy

9 lines
573 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# add_llm_account.dspy — 薄封装:走模块 helperapi_key AES 加密+端点下标校验),机构自动注入登录用户
org = await get_userorgid()
pk = dict(params_kw or {})
pk['org_id'] = org or '0'
r = json.loads(await create_llm_account(pk))
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}}