llmage/wwwroot/grap_task_status.dspy
2026-03-30 11:46:07 +08:00

18 lines
545 B
Plaintext

taskid = params_kw.taskid
async with get_sor_context(request._run_ns, 'llmage') as sor:
recs = await sor.R('llmusage', {'taskid': taskid})
if len(recs) == 0:
e = Exception(f'{taskid=} not found in llmusage')
exception(f'{e}')
raise e
llmusage = recs[0]
recs = await sor.R('llm', {'id': llmusage.llmid})
if len(recs) == 0:
e = Exception(f'{llmusage.llmid=} not found in llm')
exception(f'{e}')
raise e
llm = recs[0]
x = await query_task_status(request, llm.upappid, llm.query_apiname,
llmusage.id, llm.ownerid, taskid)