From 4fece5b72ef2920fc273b7c792620ef1abf5ae37 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 6 Jan 2026 11:48:44 +0800 Subject: [PATCH] bugfix --- llmage/llmclient.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/llmage/llmclient.py b/llmage/llmclient.py index 4ce33b7..1712eea 100644 --- a/llmage/llmclient.py +++ b/llmage/llmclient.py @@ -39,16 +39,16 @@ group by a.providerid, a.iconid, b.orgname""" async def get_llms_by_provider(pid): env = ServerEnv() - async with get_sor_context(env, 'llmage') as sor: - today = curDateString() - sql = """select * from llm + async with get_sor_context(env, 'llmage') as sor: + today = curDateString() + sql = """select * from llm where providerid = ${pid}$ - and enabled_date <= ${today}$ - and expired_date > ${today}$ - """ - recs = await sor.sqlExe(sql, {'pid': pid, 'today': today}) - return recs - return [] + and enabled_date <= ${today}$ + and expired_date > ${today}$ + """ + recs = await sor.sqlExe(sql, {'pid': pid, 'today': today}) + return recs + return [] async def get_llmcatelogs(): db = DBPools() @@ -88,10 +88,10 @@ from ( select a.*, b.hfid, e.ioid, e.stream from llm a, llmcatelog b,upapp c, uapiset d, uapi e where a.llmcatelogid = b.id - and a.upappid = c.id - and c.apisetid = d.id - and e.apisetid = d.id - and a.apiname = e.name + and a.upappid = c.id + and c.apisetid = d.id + and e.apisetid = d.id + and a.apiname = e.name and a.expired_date > ${today}$ and a.enabled_date <= ${today}$ ) x left join historyformat y on x.hfid = y.id