dify_admin/api/config.py
xh.xin 96480a27a9 初始化项目仓库,包含基础结构和开发计划
1. 添加README说明项目结构
2. 配置Python和Node.js的.gitignore
3. 包含认证模块和账号管理的前后端基础代码
4. 开发计划文档记录当前阶段任务
2025-05-02 18:33:06 +08:00

29 lines
854 B
Python
Raw 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.

import os
from dotenv import load_dotenv
# 加载.env文件中的环境变量如果存在
load_dotenv()
# 数据库配置
DB_CONFIG = {
'host': os.getenv('DB_HOST', '192.168.100.143'),
'port': os.getenv('DB_PORT', '15432'),
'database': os.getenv('DB_NAME', 'dify'),
'user': os.getenv('DB_USER', 'postgres'),
'password': os.getenv('DB_PASSWORD', 'difyai123456')
}
# API服务SQLite配置
SQLITE_CONFIG = {
'database': os.getenv('SQLITE_DB', 'api_service.db'),
'timeout': 30
}
# 文件路径配置
CONFIG_PATHS = {
'model_config': os.getenv('MODEL_CONFIG_PATH', 'model_config.json'),
'provider_config': os.getenv('PROVIDER_CONFIG_PATH', 'provider_config.json'),
'volc_model_config': os.getenv('VOLC_MODEL_CONFIG_PATH', 'model_volc_config.json'),
'privkeys_dir': os.getenv('PRIVKEYS_DIR', 'privkeys')
}