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: