Skip to content

Commit dbcbb97

Browse files
authored
Merge pull request #201 from apconw/dev
v1.2.4
2 parents 5501c68 + 6d0fe24 commit dbcbb97

File tree

8 files changed

+29
-182
lines changed

8 files changed

+29
-182
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# 项目名称和应用版本
77
PROJECT_NAME = aix-db
8-
VERSION = 1.2.3
8+
VERSION = 1.2.4
99

1010
# 基础镜像版本(依赖变更时更新此版本号)
1111
BASE_VERSION = 1.0.0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# 大模型文件输出

docker/.env.template

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ COMPOSE_PROJECT_NAME=aix-db
55
SERVER_PORT=8088
66
SERVER_WORKERS=2
77

8-
VITE_ENABLE_PAGE_AGENT=false
8+
# 前端 PageAgent 开关(运行时注入)
9+
VITE_ENABLE_PAGE_AGENT=false
10+
11+
# 深度问数HML 模型最大长度
12+
LLM_MAX_TOKENS=65536

docker/Dockerfile

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ============================================================
22
# AIX-DB 应用镜像 (App Image)
33
# 基于基础镜像,构建前端 + 复制后端源代码
4-
#
4+
#
55
# 构建时机:每次发版或修复 bug 时
66
# 构建命令:make build
77
# 构建时间:~1-2分钟(含前端构建)
@@ -49,12 +49,6 @@ COPY serv.py ./
4949
# 复制文档目录
5050
COPY docs/ docs/
5151

52-
# 确保技能安装目录存在
53-
RUN mkdir -p /aix-db/agent/common/skills
54-
55-
# 安装幻灯片生成所需的 Node.js 全局包
56-
RUN npm install -g pptxgenjs --no-fund --no-audit
57-
5852
# 清理源代码中的缓存文件(不清理 .venv 目录)
5953
RUN find . -path "./.venv" -prune -o -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true && \
6054
find . -path "./.venv" -prune -o -type f -name "*.pyc" -delete 2>/dev/null || true && \

docker/docker-compose.dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
services:
1111
aix-db:
12-
image: crpi-7xkxsdc0iki61l0q.cn-hangzhou.personal.cr.aliyuncs.com/apconw/aix-db:1.2.2
12+
image: crpi-7xkxsdc0iki61l0q.cn-hangzhou.personal.cr.aliyuncs.com/apconw/aix-db:1.2.4
1313
container_name: aix-db-dev
1414
restart: unless-stopped
1515
environment:

docker/docker-compose.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
aix-db:
3-
image: crpi-7xkxsdc0iki61l0q.cn-hangzhou.personal.cr.aliyuncs.com/apconw/aix-db:1.2.3
3+
image: crpi-7xkxsdc0iki61l0q.cn-hangzhou.personal.cr.aliyuncs.com/apconw/aix-db:1.2.4
44
container_name: aix-db
55
restart: unless-stopped
66
environment:
@@ -17,9 +17,8 @@ services:
1717
LANGFUSE_SECRET_KEY: ${LANGFUSE_SECRET_KEY:-}
1818
LANGFUSE_PUBLIC_KEY: ${LANGFUSE_PUBLIC_KEY:-}
1919
LANGFUSE_BASE_URL: ${LANGFUSE_BASE_URL:-}
20-
# 前端 PageAgent 开关(运行时注入)
2120
VITE_ENABLE_PAGE_AGENT: ${VITE_ENABLE_PAGE_AGENT:-}
22-
21+
LLM_MAX_TOKENS: ${LLM_MAX_TOKENS:-65536}
2322
ports:
2423
# 前端(通过 nginx)
2524
- "18080:80"
@@ -43,9 +42,10 @@ services:
4342
- ./volume/logs/aix-db:/var/log/aix-db
4443
- ./volume/logs/minio:/var/log/minio
4544
- ./volume/logs/postgresql:/var/log/postgresql
46-
# 技能目录持久化
47-
- ./volume/skills:/aix-db/agent/common/skills
48-
45+
# 技能目录(挂载源代码目录,实时生效)
46+
- ../agent/common/skills:/aix-db/agent/common/skills
47+
- ../agent/deepagent/skills:/aix-db/agent/deepagent/skills
48+
- ../agent/common/agent_workspace:/aix-db/agent/common/agent_workspace
4949
extra_hosts:
5050
- "host.docker.internal:host-gateway"
5151

tests/test_sql_security.py

Lines changed: 0 additions & 164 deletions
This file was deleted.

web/src/hooks/usePageAgent.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ declare global {
2727
}
2828
}
2929

30-
const PAGE_AGENT_MODEL = 'qwen3.5-plus'
30+
let PAGE_AGENT_MODEL = ''
3131

3232
const agentInstance = shallowRef<PageAgent | null>(null)
3333
const agentReady = ref(false)
@@ -248,6 +248,11 @@ export function usePageAgent() {
248248
return null
249249
}
250250

251+
if (!PAGE_AGENT_MODEL) {
252+
console.warn('[PageAgent] 模型未设置,请先调用 initFromDefaultModel 获取模型')
253+
return null
254+
}
255+
251256
if (agentInstance.value) {
252257
destroyAgent()
253258
}
@@ -309,8 +314,15 @@ export function usePageAgent() {
309314
return
310315
}
311316

317+
if (!defaultModel.base_model) {
318+
console.warn('[PageAgent] 默认模型缺少 name 字段:', defaultModel)
319+
return
320+
}
321+
322+
PAGE_AGENT_MODEL = defaultModel.base_model
323+
312324
if (!defaultModel.api_domain) {
313-
console.warn('[PageAgent] 默认模型缺少 api_domain:', defaultModel.name)
325+
console.warn('[PageAgent] 默认模型缺少 api_domain:', defaultModel.base_model)
314326
return
315327
}
316328

0 commit comments

Comments
 (0)