- BridgeConfigStore: file-backed JSON config (configs/bridge.json) - Auto-creates config file only when user saves via admin panel - Hot-reload: watches config file every 5s, reloads adapters live - Admin API: GET/PUT/DELETE /api/v1/admin/bridge/config/:name - Frontend: full CRUD page with platform type selector + toggle - Removed bridge env vars from .env.example
75 lines
1.7 KiB
Bash
75 lines
1.7 KiB
Bash
# ============================================
|
|
# Cyrene v2 配置文件 (.env)
|
|
# 复制为 .env 后修改
|
|
# ============================================
|
|
|
|
# ---- 运行环境 ----
|
|
ENV=development
|
|
LOG_LEVEL=debug
|
|
|
|
# ---- 服务器 ----
|
|
PORT=8080
|
|
HOST=0.0.0.0
|
|
|
|
# ---- 数据库 (PostgreSQL + pgvector) ----
|
|
POSTGRES_HOST=localhost
|
|
POSTGRES_PORT=5432
|
|
POSTGRES_USER=cyrene
|
|
POSTGRES_PASSWORD=cyrene_pass
|
|
POSTGRES_DB=cyrene_ai
|
|
|
|
# ---- LLM API ----
|
|
LLM_API_URL=https://api.openai.com/v1
|
|
LLM_API_KEY=sk-xxxxx
|
|
LLM_MODEL=gpt-4o
|
|
LLM_FALLBACK_MODEL=gpt-4o-mini
|
|
|
|
# ---- 记忆嵌入 (可选) ----
|
|
# 不配置时使用本地 n-gram 文本相似度
|
|
# EMBEDDING_API_URL=http://localhost:11434/v1
|
|
# EMBEDDING_MODEL=bge-m3
|
|
|
|
# ---- 认证 ----
|
|
JWT_SECRET=change-me-to-a-random-string-at-least-32-characters-long
|
|
ADMIN_USERNAME=admin
|
|
ADMIN_PASSWORD=admin12345
|
|
REGISTRATION_ENABLED=true
|
|
|
|
# ---- IoT 设备提供者 ----
|
|
# mock = 8 个模拟智能家居设备 (开发测试用)
|
|
# none = 禁用 IoT
|
|
# 未来: homeassistant / mqtt
|
|
IOT_PROVIDER=mock
|
|
|
|
# ---- 语音服务 ----
|
|
# DASHSCOPE_API_KEY=sk-xxxxx
|
|
TTS_PROVIDER=edge-tts
|
|
ASR_PROVIDER=dashscope
|
|
|
|
# ---- 后台思考 ----
|
|
ENABLE_BACKGROUND_THINKING=true
|
|
THINK_INTERVAL_SEC=300
|
|
THINK_SILENCE_TIMEOUT_SEC=120
|
|
|
|
# ---- 平台桥接 ----
|
|
# 桥接配置不在 .env 中管理。
|
|
# 通过 Admin 面板 → 平台桥接 页面进行配置。
|
|
# 配置将保存在 configs/bridge.json,支持热重载。
|
|
|
|
# ---- 搜索 (SearXNG) ----
|
|
# SEARXNG_URL=http://localhost:8088
|
|
|
|
# ---- 数据目录 ----
|
|
DATA_DIR=./data
|
|
PERSONA_DIR=./internal/persona
|
|
|
|
# ---- 跨域 ----
|
|
ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000
|
|
|
|
# ---- WebSocket ----
|
|
WS_MAX_CONNECTIONS=1000
|
|
SESSION_IDLE_TIMEOUT_MIN=30
|
|
|
|
# ---- 时区 ----
|
|
TZ=Asia/Shanghai
|