mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
- 新增 QueueTelemetryWriter 支持通过内存队列异步记录使用量 - 新增 UsageQueueConsumer 消费者,支持批量处理和流式消费 - 重构 StreamTelemetryRecorder 支持队列写入模式 - UsageService 新增 record_usage_batch 批量记录方法 - 新增 USAGE_QUEUE_ENABLED 和 USAGE_QUEUE_INCLUDE_BODIES 配置项 - 状态值新增 cancelled 类型支持
44 lines
1.4 KiB
Plaintext
44 lines
1.4 KiB
Plaintext
# ==================== 必须配置(启动前) ====================
|
||
# 以下配置项必须在项目启动前设置
|
||
|
||
# 数据库配置
|
||
DB_HOST=localhost
|
||
DB_PORT=5432
|
||
DB_USER=postgres
|
||
DB_NAME=aether
|
||
DB_PASSWORD=your_secure_password_here
|
||
|
||
# Redis 配置
|
||
REDIS_HOST=localhost
|
||
REDIS_PORT=6379
|
||
REDIS_PASSWORD=your_redis_password_here
|
||
|
||
# JWT密钥(使用 python generate_keys.py 生成)
|
||
# 用于用户登录 token 签名,更换后所有用户需重新登录
|
||
JWT_SECRET_KEY=change-this-to-a-secure-random-string
|
||
|
||
# 独立加密密钥(用于加密 Provider API Key 等敏感数据)
|
||
# 注意:更换此密钥后需要在管理面板重新配置所有 Provider API Key
|
||
ENCRYPTION_KEY=change-this-to-another-secure-random-string
|
||
|
||
# 管理员账号(仅首次初始化时使用, 创建完成后可在系统内修改密码)
|
||
ADMIN_EMAIL=admin@example.com
|
||
ADMIN_USERNAME=admin
|
||
ADMIN_PASSWORD=admin123456
|
||
|
||
# ==================== 可选配置(有默认值) ====================
|
||
# 以下配置项有合理的默认值,可按需调整
|
||
|
||
# 应用端口(默认 8084)
|
||
# APP_PORT=8084
|
||
|
||
# API Key 前缀(默认 sk)
|
||
# API_KEY_PREFIX=sk
|
||
|
||
# 日志级别(默认 INFO,可选:DEBUG, INFO, WARNING, ERROR)
|
||
# LOG_LEVEL=INFO
|
||
|
||
# CORS 配置(允许跨域的源,多个源用逗号分隔)
|
||
# 示例: http://localhost:3000,https://example.com
|
||
# 默认: * (允许所有源)
|
||
# CORS_ORIGINS=* |