ebf27a6c3e
- qa_service 定义 KGEmptyError 异常,run_query 抛出;routers/query 精确捕获 → HTTP 400 + code 3002,移除字符串匹配 - main.py CORS 改为读 CORS_ORIGINS 环境变量:未设置时 wildcard + credentials=False(合规默认),设置后显式列表 + credentials=True - .env.example 新增 CORS_ORIGINS 默认值(后端 + 前端 4 个域名)
24 lines
1.0 KiB
Bash
24 lines
1.0 KiB
Bash
# DeepSeek API (required for entity extraction + QA)
|
|
DEEPSEEK_API_KEY=your_deepseek_api_key_here
|
|
DEEPSEEK_BASE_URL=https://api.deepseek.com
|
|
|
|
# MinerU (required for document parsing)
|
|
MINERU_API_TOKEN=your_mineru_api_token_here
|
|
|
|
# MinerU venv path (absolute path to the python interpreter in mineru_mvp's venv)
|
|
# Linux: /home/user/GraphRAGAgent/mineru_mvp/.venv/bin/python
|
|
# Windows: F:/GraphRAGAgent/mineru_mvp/.venv/Scripts/python.exe
|
|
MINERU_PYTHON=/root/projects/GraphRAGAgent/mineru_mvp/.venv/bin/python
|
|
# Linux: /home/user/GraphRAGAgent/mineru_mvp/pipeline.py
|
|
# Windows: F:/GraphRAGAgent/mineru_mvp/pipeline.py
|
|
MINERU_PIPELINE=/root/projects/GraphRAGAgent/mineru_mvp/pipeline.py
|
|
|
|
# Keycloak OIDC (authentication)
|
|
KEYCLOAK_SERVER_URL=https://keycloak.plfai.cn
|
|
KEYCLOAK_REALM=plfai
|
|
KEYCLOAK_CLIENT_ID=graphrag-backend
|
|
KEYCLOAK_CLIENT_SECRET=your_keycloak_client_secret_here
|
|
KEYCLOAK_AUDIENCE=account
|
|
|
|
CORS_ORIGINS=https://graphrag-backend.plfai.cn,https://test-graphrag-backend.plfai.cn,https://graphrag.plfai.cn,https://test-graphrag.plfai.cn
|