feat: llm.name唯一索引; v1端点全部改用name查找llm
This commit is contained in:
parent
0dd5a67a2a
commit
27f3ee9c78
@ -116,5 +116,12 @@
|
||||
"textfield": "v",
|
||||
"cond": "parentid='llm_status'"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"name": "idx_llm_name",
|
||||
"idxtype": "unique",
|
||||
"idxfields": ["name"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -47,7 +47,7 @@ async with get_sor_context(env, 'llmage') as sor:
|
||||
join llm_api_map m on a.id = m.llmid
|
||||
join llmcatelog b on m.llmcatelogid = b.id
|
||||
where (b.id = ${lctype}$ OR b.name = ${lctype}$)
|
||||
and a.model=${model}$
|
||||
and a.name=${model}$
|
||||
and a.status = 'published'"""
|
||||
recs = await sor.sqlExe(sql, {
|
||||
'lctype': lctype,
|
||||
|
||||
@ -44,7 +44,7 @@ async with get_sor_context(env, 'llmage') as sor:
|
||||
join llm_api_map m on a.id = m.llmid
|
||||
join llmcatelog b on m.llmcatelogid = b.id
|
||||
where (b.id = ${lctype}$ OR b.name = ${lctype}$)
|
||||
and a.model=${model}$
|
||||
and a.name=${model}$
|
||||
and a.status = 'published'"""
|
||||
recs = await sor.sqlExe(sql, {
|
||||
'lctype': lctype,
|
||||
|
||||
@ -34,7 +34,7 @@ async with get_sor_context(env, 'llmage') as sor:
|
||||
join llm_api_map m on a.id = m.llmid
|
||||
join llmcatelog b on m.llmcatelogid = b.id
|
||||
where (b.id = ${catelogid}$ OR b.name = ${catelogid}$)
|
||||
and a.model=${model}$
|
||||
and a.name=${model}$
|
||||
and a.status = 'published'"""
|
||||
recs = await sor.sqlExe(sql, {
|
||||
'catelogid': catelogid,
|
||||
|
||||
@ -45,7 +45,7 @@ async with get_sor_context(env, 'llmage') as sor:
|
||||
join llm_api_map m on a.id = m.llmid
|
||||
join llmcatelog b on m.llmcatelogid = b.id
|
||||
where (b.id = ${lctype}$ OR b.name = ${lctype}$)
|
||||
and a.model=${model}$
|
||||
and a.name=${model}$
|
||||
and a.status = 'published'"""
|
||||
recs = await sor.sqlExe(sql, {
|
||||
'lctype': lctype,
|
||||
|
||||
@ -53,7 +53,7 @@ async with get_sor_context(env, 'llmage') as sor:
|
||||
join llm_api_map m on a.id = m.llmid
|
||||
join llmcatelog b on m.llmcatelogid = b.id
|
||||
where (b.id = ${lctype}$ OR b.name = ${lctype}$)
|
||||
and a.model=${model}$
|
||||
and a.name=${model}$
|
||||
and a.status = 'published'"""
|
||||
recs = await sor.sqlExe(sql, {
|
||||
'lctype': lctype,
|
||||
|
||||
@ -53,7 +53,7 @@ async with get_sor_context(env, 'llmage') as sor:
|
||||
join llm_api_map m on a.id = m.llmid
|
||||
join llmcatelog b on m.llmcatelogid = b.id
|
||||
where (b.id = ${lctype}$ OR b.name = ${lctype}$)
|
||||
and a.model=${model}$
|
||||
and a.name=${model}$
|
||||
and a.status = 'published'"""
|
||||
recs = await sor.sqlExe(sql, {
|
||||
'lctype': lctype,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user