- 删除 llm_catalog_rel 表定义(models/json/xlsx)、CRUD文件、管理页面、迁移脚本 - utils.py: get_llms_by_catelog/get_llms_by_catelog_to_customer 的SQL从 llm_catalog_rel 改为 llm_api_map (加distinct去重) - init.py: 缓存清除事件从 llm_catalog_rel 改为 llm_api_map - menu.ui/index.ui: 移除类型关联菜单项 - dspy文件: v1/chat/completions, t2t, get_type_llms, list_catelog_models, list_paging_catelog_llms, llmcatelog_delete 全部改为 join llm_api_map - 迁移脚本: 添加try/except兼容旧表不存在的情况
13 lines
394 B
Plaintext
13 lines
394 B
Plaintext
dbname = get_module_dbname('llmage')
|
|
db = DBPools()
|
|
async with db.sqlorContext(dbname) as sor:
|
|
sql = """select distinct a.* from llm a
|
|
join llm_api_map m on a.id = m.llmid
|
|
where m.llmcatelogid = ${llmcatelogid}$ and a.id != ${llmid}$"""
|
|
ns = params_kw.copy()
|
|
recs = await sor.sqlExe(sql, ns)
|
|
for r in recs.get('rows', []):
|
|
r.description = json.dumps(r.description)
|
|
return recs
|
|
return []
|