2024-07-07 12:18:15 +08:00
|
|
|
from pydantic_settings import SettingsConfigDict
|
2024-06-19 13:41:12 +08:00
|
|
|
|
2024-06-22 09:54:25 +08:00
|
|
|
from configs.deploy import DeploymentConfig
|
|
|
|
from configs.enterprise import EnterpriseFeatureConfig
|
|
|
|
from configs.extra import ExtraServiceConfig
|
|
|
|
from configs.feature import FeatureConfig
|
|
|
|
from configs.middleware import MiddlewareConfig
|
2024-06-19 13:41:12 +08:00
|
|
|
from configs.packaging import PackagingInfo
|
|
|
|
|
|
|
|
|
2024-06-22 09:54:25 +08:00
|
|
|
class DifyConfig(
|
2024-06-19 13:41:12 +08:00
|
|
|
# Packaging info
|
|
|
|
PackagingInfo,
|
|
|
|
# Deployment configs
|
2024-06-22 09:54:25 +08:00
|
|
|
DeploymentConfig,
|
2024-06-19 13:41:12 +08:00
|
|
|
# Feature configs
|
2024-06-22 09:54:25 +08:00
|
|
|
FeatureConfig,
|
2024-06-19 13:41:12 +08:00
|
|
|
# Middleware configs
|
2024-06-22 09:54:25 +08:00
|
|
|
MiddlewareConfig,
|
2024-06-19 13:41:12 +08:00
|
|
|
# Extra service configs
|
2024-06-22 09:54:25 +08:00
|
|
|
ExtraServiceConfig,
|
2024-06-19 13:41:12 +08:00
|
|
|
# Enterprise feature configs
|
|
|
|
# **Before using, please contact business@dify.ai by email to inquire about licensing matters.**
|
2024-06-22 09:54:25 +08:00
|
|
|
EnterpriseFeatureConfig,
|
2024-06-19 13:41:12 +08:00
|
|
|
):
|
|
|
|
model_config = SettingsConfigDict(
|
|
|
|
# read from dotenv format config file
|
2024-08-23 23:46:01 +08:00
|
|
|
env_file=".env",
|
|
|
|
env_file_encoding="utf-8",
|
2024-07-07 12:18:15 +08:00
|
|
|
frozen=True,
|
2024-06-19 13:41:12 +08:00
|
|
|
# ignore extra attributes
|
2024-08-23 23:46:01 +08:00
|
|
|
extra="ignore",
|
2024-06-19 13:41:12 +08:00
|
|
|
)
|
2024-07-06 12:05:13 +08:00
|
|
|
|
2024-08-23 22:40:07 +08:00
|
|
|
# Before adding any config,
|
|
|
|
# please consider to arrange it in the proper config group of existed or added
|
|
|
|
# for better readability and maintainability.
|
|
|
|
# Thanks for your concentration and consideration.
|