Files
PicAnalysis/backend/.env.example

55 lines
1.4 KiB
Plaintext
Raw Normal View History

# Database
DATABASE_URL="file:./dev.db"
# JWT
JWT_SECRET="your-secret-key-change-in-production"
JWT_EXPIRES_IN="24h"
# Server
PORT=4000
NODE_ENV="development"
# CORS
CORS_ORIGIN="http://localhost:3000"
# OCR
# OCR Provider: tesseract | baidu | rapidocr | auto
# - tesseract: 本地轻量,需要安装 tesseract.js
# - baidu: 云端准确,需要配置 API Key (有免费额度)
# - rapidocr: 本地快速准确,需要启动 RapidOCR 服务
# - auto: 自动选择可用的 provider
OCR_PROVIDER="auto"
OCR_CONFIDENCE_THRESHOLD="0.3"
# Tesseract.js (本地 OCR无需额外配置)
# 安装: npm install tesseract.js
# Baidu OCR (云端 OCR需要申请密钥)
# 获取地址: https://cloud.baidu.com/product/ocr
BAIDU_OCR_API_KEY=""
BAIDU_OCR_SECRET_KEY=""
# RapidOCR (本地快速 OCR需要启动服务)
# Docker: docker run -d -p 8080:8080 cshgg/rapidocr
# 或参考: https://github.com/RapidAI/RapidOCR
RAPIDOCR_API_URL="http://localhost:8080"
# AI (GLM)
GLM_API_KEY=""
GLM_API_URL="https://open.bigmodel.cn/api/paas/v4/chat/completions"
GLM_MODEL="glm-4-flash"
# AI (MiniMax)
MINIMAX_API_KEY=""
MINIMAX_API_URL="https://api.minimax.chat/v1/chat/completions"
MINIMAX_MODEL="abab6.5s-chat"
# AI (DeepSeek)
DEEPSEEK_API_KEY=""
DEEPSEEK_API_URL="https://api.deepseek.com/v1/chat/completions"
DEEPSEEK_MODEL="deepseek-chat"
# Upload
UPLOAD_MAX_SIZE="10485760"
UPLOAD_ALLOWED_TYPES="image/jpeg,image/png,image/webp"