a3245b249a
- API Key: run.md/.env/seed_model_providers.sql 中明文Key替换为占位符 - 认证: JWT从localStorage迁移到HttpOnly Cookie,移除后端body返回token - 前端: api.ts/knowledge/page.tsx/auth.ts 全面改用Cookie认证 - postcss XSS: package.json添加overrides强制升级到8.5.15 - gitignore: 添加server/.env和.env排除规则 - lint: 移除tenant.go中未使用的roleKey常量 - 文档: 新增docs/security-audit-report.md和hardware-requirements.md
32 lines
946 B
SQL
32 lines
946 B
SQL
-- 初始化 model_providers 表:添加当前使用的通义千问配置
|
|
|
|
INSERT INTO model_providers (
|
|
id,
|
|
name,
|
|
base_url,
|
|
api_key_encrypted,
|
|
models,
|
|
is_active,
|
|
priority,
|
|
config
|
|
) VALUES (
|
|
gen_random_uuid(),
|
|
'阿里云百炼 (通义千问)',
|
|
'https://dashscope.aliyuncs.com/compatible-mode/v1',
|
|
'[YOUR_API_KEY]', -- 部署时通过环境变量 OPENAI_API_KEY 注入
|
|
'[
|
|
{"id": "qwen-plus", "name": "通义千问-Plus", "type": "chat"},
|
|
{"id": "qwen-turbo", "name": "通义千问-Turbo", "type": "chat"},
|
|
{"id": "qwen-max", "name": "通义千问-Max", "type": "chat"},
|
|
{"id": "qwen-long", "name": "通义千问-Long", "type": "chat"}
|
|
]'::jsonb,
|
|
true,
|
|
100,
|
|
'{
|
|
"provider": "openai",
|
|
"default_model": "qwen-plus",
|
|
"supports_function_calling": true,
|
|
"supports_streaming": true
|
|
}'::jsonb
|
|
)
|
|
ON CONFLICT DO NOTHING; |