first commit
This commit is contained in:
@@ -12,6 +12,22 @@ class DevelopmentConfig(Config):
|
||||
super().__init__()
|
||||
if not self.SQLALCHEMY_DATABASE_URI:
|
||||
self.SQLALCHEMY_DATABASE_URI = 'sqlite:///dev.db'
|
||||
|
||||
# 开发环境API配置(如果未设置,使用示例值并给出警告)
|
||||
if not self.LLM_API_KEY:
|
||||
self.LLM_API_KEY = 'sk-dev-example-api-key'
|
||||
import warnings
|
||||
warnings.warn("LLM_API_KEY not set, using development example key")
|
||||
|
||||
if not self.WX_APPID:
|
||||
self.WX_APPID = 'wx-dev-example-appid'
|
||||
|
||||
if not self.WX_SECRET:
|
||||
self.WX_SECRET = 'wx-dev-example-secret'
|
||||
|
||||
# 开发环境CORS配置(如果没有设置,使用开发默认值)
|
||||
if not self.CORS_ORIGINS or self.CORS_ORIGINS == ['']:
|
||||
self.CORS_ORIGINS = ['http://localhost:3000', 'http://127.0.0.1:3000', '*']
|
||||
|
||||
# 开发环境日志配置
|
||||
LOG_LEVEL = 'DEBUG'
|
||||
|
||||
Reference in New Issue
Block a user