From 2661ebbc773979711d47d4a181e54086ec9e7722 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 22 May 2026 11:48:25 +0800 Subject: [PATCH] buggix --- llmage/utils.py | 9 +++++---- models/llm_api_map.json | 16 ++++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/llmage/utils.py b/llmage/utils.py index a8e7850..ef075eb 100644 --- a/llmage/utils.py +++ b/llmage/utils.py @@ -304,12 +304,13 @@ lc.name as catelogname from llm a ,llm_api_map m ,llmcatelog lc -,upapp c on a.upappid = c.id -,uapi e on c.apisetid = e.apisetid and m.apiname = e.name +,upapp c +,uapi e ,uapiio f on e.ioid = f.id where a.id = m.llmid and a.upappid = c.id -and c.apisetid = e.apisetid and m.apiname = e.name +and c.id = e.upappid +and m.apiname = e.name and e.ioid = f.id and a.id = ${llmid}$ and a.expired_date > ${today}$ @@ -320,7 +321,7 @@ and a.enabled_date <= ${today}$ sql += ' and m.llmcatelogid = ${catelogid}$ ' ns['catelogid'] = catelogid else: - sql += ' and a.llmcatelogid = lc.id ' + sql += ' and m.isdefaultcatelog = lc.id ' recs = await sor.sqlExe(sql, ns.copy()) if len(recs) > 0: r = recs[0] diff --git a/models/llm_api_map.json b/models/llm_api_map.json index 4276196..d7bf2e1 100644 --- a/models/llm_api_map.json +++ b/models/llm_api_map.json @@ -13,47 +13,47 @@ "name": "id", "type": "varchar(32)", "not_null": true, - "comment": "主键ID" + "title": "主键ID" }, { "name": "llmid", "type": "varchar(32)", "not_null": true, - "comment": "模型ID,关联llm表" + "title": "模型ID" }, { "name": "llmcatelogid", "type": "varchar(32)", "not_null": true, - "comment": "模型分类ID,关联llmcatelog表" + "title": "模型分类ID" }, { "name": "apiname", "type": "varchar(100)", "not_null": true, - "comment": "推理接口名称,关联uapi表name字段" + "title": "接口名称" }, { "name": "query_apiname", "type": "varchar(100)", - "comment": "异步任务结果查询接口名称,可逗号分隔多个" + "title": "任务结果查询接口名称" }, { "name": "query_period", "type": "bigint", "default": 30, - "comment": "异步任务查询轮询间隔(秒),默认30" + "title": "任务查询间隔(秒)" }, { "name": "ppid", "type": "varchar(32)", - "comment": "计费程序ID,关联pricing_program表" + "title": "定价ID" }, { "name": "isdefaultcatelog", "type": "varchar(1)", "not_null": true, - "comment": "缺省分类" + "title": "缺省分类" } ], "indexes": [