fix: endpoint_pref字典parentid缩短为llm_ep_pref——组合键超appcodes_kv.id 32字符限制
This commit is contained in:
parent
f08a906323
commit
dd19641175
@ -23,7 +23,7 @@
|
|||||||
{"k": "tts", "v": "语音合成"},
|
{"k": "tts", "v": "语音合成"},
|
||||||
{"k": "asr", "v": "语音识别"}
|
{"k": "asr", "v": "语音识别"}
|
||||||
]},
|
]},
|
||||||
{"parentid": "llm_endpoint_pref", "parentname": "端点偏好", "items": [
|
{"parentid": "llm_ep_pref", "parentname": "端点偏好", "items": [
|
||||||
{"k": "any", "v": "不限"},
|
{"k": "any", "v": "不限"},
|
||||||
{"k": "prefer_domestic", "v": "优先国内"},
|
{"k": "prefer_domestic", "v": "优先国内"},
|
||||||
{"k": "prefer_intl", "v": "优先国际"},
|
{"k": "prefer_intl", "v": "优先国际"},
|
||||||
|
|||||||
@ -84,7 +84,7 @@
|
|||||||
"table": "appcodes_kv",
|
"table": "appcodes_kv",
|
||||||
"valuefield": "k",
|
"valuefield": "k",
|
||||||
"textfield": "v",
|
"textfield": "v",
|
||||||
"cond": "parentid='llm_endpoint_pref'"
|
"cond": "parentid='llm_ep_pref'"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"field": "status",
|
"field": "status",
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
# get_llm_endpoint_pref_options.dspy — appcodes_kv 下拉选项(parentid=llm_endpoint_pref)
|
# get_llm_ep_pref_options.dspy — appcodes_kv 下拉选项(parentid=llm_ep_pref)
|
||||||
dbname = get_module_dbname('pipeline_llm')
|
dbname = get_module_dbname('pipeline_llm')
|
||||||
try:
|
try:
|
||||||
async with get_sor_context(request._run_ns, dbname) as sor:
|
async with get_sor_context(request._run_ns, dbname) as sor:
|
||||||
recs = await sor.sqlExe(
|
recs = await sor.sqlExe(
|
||||||
"SELECT k, v FROM appcodes_kv WHERE parentid=${p}$ ORDER BY k",
|
"SELECT k, v FROM appcodes_kv WHERE parentid=${p}$ ORDER BY k",
|
||||||
{"p": "llm_endpoint_pref"})
|
{"p": "llm_ep_pref"})
|
||||||
await sor.sqlExe("COMMIT", {})
|
await sor.sqlExe("COMMIT", {})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return {"success": False, "message": str(e), "data": []}
|
return {"success": False, "message": str(e), "data": []}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user