Skip to content

Commit 5b7272d

Browse files
perf: Assistant dynamic ds
1 parent d0406a1 commit 5b7272d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

backend/apps/chat/task/llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ def run_task(self, in_chat: bool = True):
802802
SQLBotLogUtil.info(full_sql_text)
803803

804804
# todo row permission
805-
if is_normal_user(self.current_user):
805+
if is_normal_user(self.current_user) and not self.current_assistant:
806806
sql_json_str = extract_nested_json(full_sql_text)
807807
data = orjson.loads(sql_json_str)
808808

backend/apps/system/crud/assistant.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ def get_ds_engine(ds: AssistantOutDsSchema) -> Engine:
192192
extraJdbc=ds.extraParams,
193193
dbSchema=ds.db_schema or ''
194194
)
195+
conf.extraJdbc = ''
195196
from apps.db.db import get_uri_from_config
196197
uri = get_uri_from_config(ds.type, conf)
197198
if ds.type == "pg" and ds.db_schema:

0 commit comments

Comments
 (0)