Json-Python-Server/.env.example
2026-01-29 18:18:32 +08:00

48 lines
1012 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 环境配置模板
# 复制此文件为 .env 并填入实际值
# 环境
ENV=development
DEBUG=False
# 服务器配置
HOST=0.0.0.0
PORT=60201
# CORS 配置 (逗号分隔)
CORS_ORIGINS=*
# API 暴露模式
# full: 暴露 v1 + v2默认
# v2: 仅暴露 /api/v2 分析接口 + 基础状态接口(禁用 v1 上传/文件/图片接口)
API_MODE=full
# 文件上传
UPLOAD_DIR=uploads
MAX_UPLOAD_SIZE=16777216 # 16MB (字节)
TEMP_DIR=temp
# 字体配置
FONTS_DIR=resource/fonts
# API 配置 (阿里云千问)
MY_API_KEY=sk-your-api-key-here
MY_API_BASE=https://dashscope.aliyuncs.com/compatible-mode/v1
MY_MODEL=qwen-turbo
# 分析配置
LANGUAGE_DEFAULT=zh
ANALYSIS_TIMEOUT=300
MAX_MEMORY_MB=500
# v2 (OSS URL) 安全配置
# V2_ALLOWED_HOSTS=oss.example.com,oss-cn-hangzhou.aliyuncs.com
# V2_ALLOW_HTTP=False
# V2_ALLOW_PRIVATE_NETWORKS=False
# V2_CONNECT_TIMEOUT_SECONDS=5
# V2_DOWNLOAD_TIMEOUT_SECONDS=30
# 日志
LOG_LEVEL=INFO
LOG_DIR=logs