密钥写死,处理报错

This commit is contained in:
2025-08-18 22:39:34 +08:00
parent 23a5c907f7
commit cc8d488bd9
11 changed files with 1452 additions and 367 deletions

View File

@@ -22,22 +22,12 @@ class Config:
}
# OpenAI兼容API配置
LLM_API_URL = os.environ.get('LLM_API_URL')
if not LLM_API_URL:
raise ValueError("LLM_API_URL 环境变量未设置")
LLM_API_KEY = os.environ.get('LLM_API_KEY')
if not LLM_API_KEY:
raise ValueError("LLM_API_KEY 环境变量未设置")
LLM_API_URL = os.environ.get('LLM_API_URL') or 'https://api.deepseek.com/v1'
LLM_API_KEY = os.environ.get('LLM_API_KEY') or 'sk-your-api-key-here'
# 微信小程序配置
WX_APPID = os.environ.get('WX_APPID')
if not WX_APPID:
raise ValueError("WX_APPID 环境变量未设置")
WX_SECRET = os.environ.get('WX_SECRET')
if not WX_SECRET:
raise ValueError("WX_SECRET 环境变量未设置")
WX_APPID = os.environ.get('WX_APPID') or 'wx-your-appid-here'
WX_SECRET = os.environ.get('WX_SECRET') or 'your-wx-secret-here'
# 跨域配置
CORS_ORIGINS = os.environ.get('CORS_ORIGINS', '*').split(',')