bugfix
This commit is contained in:
parent
d4c079d11e
commit
cab7843f95
@ -1,33 +1,36 @@
|
|||||||
lt = params_kw.catelogid or 't2v'
|
lt = params_kw.catelogid or 't2v'
|
||||||
async with get_sor_context(request._run_ns, 'llmage') as sor:
|
debug(f'{lt=}')
|
||||||
sql = '''select distinct a.*, e.input_fields from llm a
|
try:
|
||||||
join llm_api_map m on a.id = m.llmid
|
async with get_sor_context(request._run_ns, 'llmage') as sor:
|
||||||
join llmcatelog b on m.llmcatelogid = b.id
|
sql = '''select distinct a.*, e.input_fields from llm a
|
||||||
join uapi d on d.upappid = a.upappid and a.apiname = d.name
|
join llm_api_map m on a.id = m.llmid
|
||||||
join uapiio e on d.ioid = e.id
|
join llmcatelog b on m.llmcatelogid = b.id
|
||||||
where (b.id=${lt}$ OR b.name=${lt}$)
|
join uapi d on d.upappid = a.upappid and a.apiname = d.name
|
||||||
and a.enabled_date <= ${biz_date}$
|
join uapiio e on d.ioid = e.id
|
||||||
and ${biz_date}$ < a.expired_date
|
where (b.id=${lt}$ OR b.name=${lt}$)
|
||||||
and a.status = 'published'
|
and a.enabled_date <= ${biz_date}$
|
||||||
and m.ppid is not NULL'''
|
and ${biz_date}$ < a.expired_date
|
||||||
biz_date = await get_business_date(sor)
|
and a.status = 'published'
|
||||||
recs = await sor.sqlExe(sql, {
|
and m.ppid is not NULL'''
|
||||||
'biz_date': biz_date,
|
biz_date = await get_business_date(sor)
|
||||||
'lt': lt
|
recs = await sor.sqlExe(sql, {
|
||||||
})
|
'biz_date': biz_date,
|
||||||
for r in recs:
|
'lt': lt
|
||||||
r.input_fields = json.loads(r.input_fields)
|
})
|
||||||
|
for r in recs:
|
||||||
|
r.input_fields = json.loads(r.input_fields)
|
||||||
|
return {
|
||||||
|
'status': 'ok',
|
||||||
|
'data': recs
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
'status': 'ok',
|
'status': 'error',
|
||||||
'data': recs
|
'data':{
|
||||||
|
'message': 'server error'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return {
|
except Exception as e:
|
||||||
'status': 'error',
|
debug(f'{lt=},{e},{format_exc()}')
|
||||||
'data':{
|
|
||||||
'message': 'server error'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user