From bebb8b2a87d60c5263f62d330559188306282ac5 Mon Sep 17 00:00:00 2001 From: ymq Date: Sat, 22 Aug 2026 11:36:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=A8=A1=E5=9E=8B=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=E6=8C=89=E6=9C=BA=E6=9E=84=E9=9A=94=E7=A6=BB=EF=BC=88?= =?UTF-8?q?=E4=B8=A5=E6=A0=BC=E6=9C=AC=E6=9C=BA=E6=9E=84=EF=BC=8C=E6=9C=BA?= =?UTF-8?q?=E6=9E=84=E6=B2=A1=E9=85=8D=20llm=20=E5=88=99=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/api/get_model_options.dspy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wwwroot/api/get_model_options.dspy b/wwwroot/api/get_model_options.dspy index 86305f7..4762a62 100644 --- a/wwwroot/api/get_model_options.dspy +++ b/wwwroot/api/get_model_options.dspy @@ -1,7 +1,10 @@ import json try: + userorgid = await get_userorgid() + if not userorgid: + return json.dumps([{'value': '', 'text': '缺省(用项目默认模型)'}], ensure_ascii=False) async with get_sor_context(request._run_ns, 'pipeline') as sor: - rows = await sor.sqlExe("select name as value, name as text from llm where status='active' order by name", {}) + rows = await sor.sqlExe("select name as value, name as text from llm where status='active' and org_id=${org}$ order by name", {'org': userorgid}) r = [{'value': '', 'text': '缺省(用项目默认模型)'}] + list(rows) return json.dumps(r, ensure_ascii=False) except Exception as e: