Files
dify/api/configs/deploy/__init__.py
8cbb6c0130 feat: HITL IM integration (#44864)
Co-authored-by: zxhlyh <jasonapring2015@outlook.com>
Co-authored-by: JzoNg <jzongcode@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-10-30 02:43:31 +00:00

56 lines
1.5 KiB
Python

from enum import StrEnum
from pydantic import Field
from pydantic_settings import BaseSettings
from enums import DeploymentEdition
class IMEventTransportMode(StrEnum):
"""Deployment-wide transport used for inbound IM provider events."""
WEBHOOK = "WEBHOOK"
STREAM = "STREAM"
class DeploymentConfig(BaseSettings):
"""
Configuration settings for application deployment
"""
APPLICATION_NAME: str = Field(
description="Name of the application, used for identification and logging purposes",
default="langgenius/dify",
)
DEBUG: bool = Field(
description="Enable debug mode for additional logging and development features",
default=False,
)
# Request logging configuration
ENABLE_REQUEST_LOGGING: bool = Field(
description="Enable request and response body logging",
default=False,
)
DEPLOYMENT_EDITION: DeploymentEdition = Field(
description="Product edition of the application.",
default=DeploymentEdition.COMMUNITY,
)
HUMAN_INPUT_IM_EVENT_TRANSPORT_MODE: IMEventTransportMode = Field(
IMEventTransportMode.WEBHOOK,
description="Required deployment-wide transport for Human Input IM provider events.",
)
INIT_PASSWORD: str = Field(
description="Password required before initializing a self-hosted deployment",
default="",
)
DEPLOY_ENV: str = Field(
description="Deployment environment (e.g., 'PRODUCTION', 'DEVELOPMENT'), default to PRODUCTION",
default="PRODUCTION",
)