From 5b7272d58455ac903435dfac22cc13db3b6e845d Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 28 Jul 2025 21:39:15 +0800 Subject: [PATCH] perf: Assistant dynamic ds --- backend/apps/chat/task/llm.py | 2 +- backend/apps/system/crud/assistant.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/apps/chat/task/llm.py b/backend/apps/chat/task/llm.py index c5ed34c9..749469ee 100644 --- a/backend/apps/chat/task/llm.py +++ b/backend/apps/chat/task/llm.py @@ -802,7 +802,7 @@ class LLMService: SQLBotLogUtil.info(full_sql_text) # todo row permission - if is_normal_user(self.current_user): + if is_normal_user(self.current_user) and not self.current_assistant: sql_json_str = extract_nested_json(full_sql_text) data = orjson.loads(sql_json_str) diff --git a/backend/apps/system/crud/assistant.py b/backend/apps/system/crud/assistant.py index d56acb97..c916262b 100644 --- a/backend/apps/system/crud/assistant.py +++ b/backend/apps/system/crud/assistant.py @@ -192,6 +192,7 @@ def get_ds_engine(ds: AssistantOutDsSchema) -> Engine: extraJdbc=ds.extraParams, dbSchema=ds.db_schema or '' ) + conf.extraJdbc = '' from apps.db.db import get_uri_from_config uri = get_uri_from_config(ds.type, conf) if ds.type == "pg" and ds.db_schema: