llmage/wwwroot/list_catelog_models.dspy
2025-09-14 15:20:36 +08:00

11 lines
340 B
Plaintext

dbname = get_module_dbname('llmage')
db = DBPools()
async with db.sqlorContext(dbname) as sor:
sql = """select * from llm where llmcatelogid = ${llmcatelogid}$ and 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 []