Skip to content

Commit baa7f93

Browse files
committed
Merge branch 'main' of https://github.com/dataease/SQLBot
2 parents c608b5e + 143ab1f commit baa7f93

File tree

7 files changed

+25
-20
lines changed

7 files changed

+25
-20
lines changed

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ ENV SQLBOT_HOME=/opt/sqlbot
5454
ENV PYTHONPATH=${SQLBOT_HOME}/app
5555
ENV PATH="${SQLBOT_HOME}/app/.venv/bin:$PATH"
5656

57-
ENV SQLBOT_DB_HOST=localhost
58-
ENV SQLBOT_DB_PORT=5432
59-
ENV SQLBOT_DB_DB=sqlbot
60-
ENV SQLBOT_DB_USER=root
61-
ENV SQLBOT_DB_PASSWORD=Password123@pg
57+
# ENV POSTGRES_SERVER=localhost
58+
# ENV POSTGRES_PORT=5432
59+
# ENV POSTGRES_DB=sqlbot
60+
# ENV POSTGRES_USER=root
61+
# ENV POSTGRES_PASSWORD=Password123@pg
6262

6363
# Copy necessary files from builder
6464
COPY start.sh /opt/sqlbot/app/start.sh

backend/apps/system/crud/assistant.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def get_ds(self, ds_id: int):
177177
def convert2schema(self, ds_dict: dict, config: dict[any]) -> AssistantOutDsSchema:
178178
id_marker: str = ''
179179
attr_list = ['name', 'type', 'host', 'port', 'user', 'dataBase', 'schema']
180-
if config.get('encrypt', True):
180+
if config.get('encrypt', False):
181181
key = config.get('aes_key', None)
182182
iv = config.get('aes_iv', None)
183183
aes_attrs = ['host', 'user', 'password', 'dataBase', 'db_schema']

backend/apps/system/middleware/auth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ async def validateAssistant(self, assistantToken: Optional[str], trans: I18n) ->
115115
assistant_info = AssistantHeader.model_validate(assistant_info.model_dump(exclude_unset=True))
116116
if assistant_info and assistant_info.type == 0:
117117
if payload['oid']:
118-
session_user.oid = payload['oid']
118+
session_user.oid = int(payload['oid'])
119119
else:
120120
assistant_oid = 1
121121
configuration = assistant_info.configuration
122122
config_obj = json.loads(configuration) if configuration else {}
123123
assistant_oid = config_obj.get('oid', 1)
124-
session_user.oid = assistant_oid
124+
session_user.oid = int(assistant_oid)
125125

126126
return True, session_user, assistant_info
127127
except Exception as e:

backend/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "sqlbot"
3-
version = "1.0.1"
3+
version = "1.1.0"
44
description = ""
55
requires-python = "==3.11.*"
66
dependencies = [
@@ -39,7 +39,7 @@ dependencies = [
3939
"pyyaml (>=6.0.2,<7.0.0)",
4040
"fastapi-mcp (>=0.3.4,<0.4.0)",
4141
"tabulate>=0.9.0",
42-
"sqlbot-xpack>=0.0.3.20,<1.0.0",
42+
"sqlbot-xpack>=0.0.3.31,<1.0.0",
4343
"fastapi-cache2>=0.2.2",
4444
"sqlparse>=0.5.3",
4545
"redis>=6.2.0",

frontend/src/entity/supplier.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,8 @@ export const supplierList: Array<{
4949
{ name: 'qwen-max-latest' },
5050
{ name: 'qwen-turbo' },
5151
{ name: 'qwen-turbo-latest' },
52-
{ name: 'qwq-plus' },
53-
{ name: 'qwq-plus-latest' },
5452
{ name: 'qwen-long' },
5553
{ name: 'qwen-long-latest' },
56-
{ name: 'qwen-omni-turbo' },
57-
/* { name: 'qwen-omni-turbo-realtime' },
58-
{ name: 'qwen-omni-turbo-realtime-latest' }, */
59-
/* { name: 'qvq-max' },
60-
{ name: 'qvq-max-latest' },
61-
{ name: 'qvq-plus' },
62-
{ name: 'qvq-plus-latest' }, */
6354
],
6455
},
6556
},

frontend/src/views/system/embedded/iframe.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const certificateForm = reactive(cloneDeep(defaultCertificateForm))
7979
8080
const defaultUrlForm = {
8181
endpoint: '',
82-
encrypt: true,
82+
encrypt: false,
8383
aes_key: '',
8484
aes_iv: '',
8585
certificate: [] as any,

installer/install.conf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ SQLBOT_BASE=/opt
55
SQLBOT_WEB_PORT=8000
66
SQLBOT_MCP_PORT=8001
77

8+
# 数据库配置
9+
## 是否使用外部数据库
10+
SQLBOT_EXTERNAL_DB=false
11+
## 数据库地址
12+
SQLBOT_DB_HOST=localhost
13+
## 数据库端口 (仅使用外部数据库时才生效)
14+
SQLBOT_DB_PORT=5432
15+
## SQLBot 数据库库名
16+
SQLBOT_DB_DB=sqlbot
17+
## 数据库用户名
18+
SQLBOT_DB_USER=root
19+
## 数据库密码,密码如包含特殊字符,请用双引号引起来,例如 SQLBOT_DB_PASSWORD="Test@4&^%*^"
20+
SQLBOT_DB_PASSWORD=Password123@pg
21+
822
# 其他配置
923
## 普通用户默认密码
1024
SQLBOT_DEFAULT_PWD=SQLBot@123456

0 commit comments

Comments
 (0)