| @@ -4,30 +4,30 @@ from pydantic_settings import BaseSettings | |||
| class DeploymentConfig(BaseSettings): | |||
| """ | |||
| Deployment configs | |||
| Configuration settings for application deployment | |||
| """ | |||
| APPLICATION_NAME: str = Field( | |||
| description="application name", | |||
| description="Name of the application, used for identification and logging purposes", | |||
| default="langgenius/dify", | |||
| ) | |||
| DEBUG: bool = Field( | |||
| description="whether to enable debug mode.", | |||
| description="Enable debug mode for additional logging and development features", | |||
| default=False, | |||
| ) | |||
| TESTING: bool = Field( | |||
| description="", | |||
| description="Enable testing mode for running automated tests", | |||
| default=False, | |||
| ) | |||
| EDITION: str = Field( | |||
| description="deployment edition", | |||
| description="Deployment edition of the application (e.g., 'SELF_HOSTED', 'CLOUD')", | |||
| default="SELF_HOSTED", | |||
| ) | |||
| DEPLOY_ENV: str = Field( | |||
| description="deployment environment, default to PRODUCTION.", | |||
| description="Deployment environment (e.g., 'PRODUCTION', 'DEVELOPMENT'), default to PRODUCTION", | |||
| default="PRODUCTION", | |||
| ) | |||
| @@ -4,17 +4,17 @@ from pydantic_settings import BaseSettings | |||
| class EnterpriseFeatureConfig(BaseSettings): | |||
| """ | |||
| Enterprise feature configs. | |||
| Configuration for enterprise-level features. | |||
| **Before using, please contact business@dify.ai by email to inquire about licensing matters.** | |||
| """ | |||
| ENTERPRISE_ENABLED: bool = Field( | |||
| description="whether to enable enterprise features." | |||
| description="Enable or disable enterprise-level features." | |||
| "Before using, please contact business@dify.ai by email to inquire about licensing matters.", | |||
| default=False, | |||
| ) | |||
| CAN_REPLACE_LOGO: bool = Field( | |||
| description="whether to allow replacing enterprise logo.", | |||
| description="Allow customization of the enterprise logo.", | |||
| default=False, | |||
| ) | |||
| @@ -6,30 +6,31 @@ from pydantic_settings import BaseSettings | |||
| class NotionConfig(BaseSettings): | |||
| """ | |||
| Notion integration configs | |||
| Configuration settings for Notion integration | |||
| """ | |||
| NOTION_CLIENT_ID: Optional[str] = Field( | |||
| description="Notion client ID", | |||
| description="Client ID for Notion API authentication. Required for OAuth 2.0 flow.", | |||
| default=None, | |||
| ) | |||
| NOTION_CLIENT_SECRET: Optional[str] = Field( | |||
| description="Notion client secret key", | |||
| description="Client secret for Notion API authentication. Required for OAuth 2.0 flow.", | |||
| default=None, | |||
| ) | |||
| NOTION_INTEGRATION_TYPE: Optional[str] = Field( | |||
| description="Notion integration type, default to None, available values: internal.", | |||
| description="Type of Notion integration." | |||
| " Set to 'internal' for internal integrations, or None for public integrations.", | |||
| default=None, | |||
| ) | |||
| NOTION_INTERNAL_SECRET: Optional[str] = Field( | |||
| description="Notion internal secret key", | |||
| description="Secret key for internal Notion integrations. Required when NOTION_INTEGRATION_TYPE is 'internal'.", | |||
| default=None, | |||
| ) | |||
| NOTION_INTEGRATION_TOKEN: Optional[str] = Field( | |||
| description="Notion integration token", | |||
| description="Integration token for Notion API access. Used for direct API calls without OAuth flow.", | |||
| default=None, | |||
| ) | |||
| @@ -6,20 +6,23 @@ from pydantic_settings import BaseSettings | |||
| class SentryConfig(BaseSettings): | |||
| """ | |||
| Sentry configs | |||
| Configuration settings for Sentry error tracking and performance monitoring | |||
| """ | |||
| SENTRY_DSN: Optional[str] = Field( | |||
| description="Sentry DSN", | |||
| description="Sentry Data Source Name (DSN)." | |||
| " This is the unique identifier of your Sentry project, used to send events to the correct project.", | |||
| default=None, | |||
| ) | |||
| SENTRY_TRACES_SAMPLE_RATE: NonNegativeFloat = Field( | |||
| description="Sentry trace sample rate", | |||
| description="Sample rate for Sentry performance monitoring traces." | |||
| " Value between 0.0 and 1.0, where 1.0 means 100% of traces are sent to Sentry.", | |||
| default=1.0, | |||
| ) | |||
| SENTRY_PROFILES_SAMPLE_RATE: NonNegativeFloat = Field( | |||
| description="Sentry profiles sample rate", | |||
| description="Sample rate for Sentry profiling." | |||
| " Value between 0.0 and 1.0, where 1.0 means 100% of profiles are sent to Sentry.", | |||
| default=1.0, | |||
| ) | |||
| @@ -8,145 +8,143 @@ from configs.feature.hosted_service import HostedServiceConfig | |||
| class SecurityConfig(BaseSettings): | |||
| """ | |||
| Secret Key configs | |||
| Security-related configurations for the application | |||
| """ | |||
| SECRET_KEY: Optional[str] = Field( | |||
| description="Your App secret key will be used for securely signing the session cookie" | |||
| description="Secret key for secure session cookie signing." | |||
| "Make sure you are changing this key for your deployment with a strong key." | |||
| "You can generate a strong key using `openssl rand -base64 42`." | |||
| "Alternatively you can set it with `SECRET_KEY` environment variable.", | |||
| "Generate a strong key using `openssl rand -base64 42` or set via the `SECRET_KEY` environment variable.", | |||
| default=None, | |||
| ) | |||
| RESET_PASSWORD_TOKEN_EXPIRY_HOURS: PositiveInt = Field( | |||
| description="Expiry time in hours for reset token", | |||
| description="Duration in hours for which a password reset token remains valid", | |||
| default=24, | |||
| ) | |||
| class AppExecutionConfig(BaseSettings): | |||
| """ | |||
| App Execution configs | |||
| Configuration parameters for application execution | |||
| """ | |||
| APP_MAX_EXECUTION_TIME: PositiveInt = Field( | |||
| description="execution timeout in seconds for app execution", | |||
| description="Maximum allowed execution time for the application in seconds", | |||
| default=1200, | |||
| ) | |||
| APP_MAX_ACTIVE_REQUESTS: NonNegativeInt = Field( | |||
| description="max active request per app, 0 means unlimited", | |||
| description="Maximum number of concurrent active requests per app (0 for unlimited)", | |||
| default=0, | |||
| ) | |||
| class CodeExecutionSandboxConfig(BaseSettings): | |||
| """ | |||
| Code Execution Sandbox configs | |||
| Configuration for the code execution sandbox environment | |||
| """ | |||
| CODE_EXECUTION_ENDPOINT: HttpUrl = Field( | |||
| description="endpoint URL of code execution service", | |||
| description="URL endpoint for the code execution service", | |||
| default="http://sandbox:8194", | |||
| ) | |||
| CODE_EXECUTION_API_KEY: str = Field( | |||
| description="API key for code execution service", | |||
| description="API key for accessing the code execution service", | |||
| default="dify-sandbox", | |||
| ) | |||
| CODE_EXECUTION_CONNECT_TIMEOUT: Optional[float] = Field( | |||
| description="connect timeout in seconds for code execution request", | |||
| description="Connection timeout in seconds for code execution requests", | |||
| default=10.0, | |||
| ) | |||
| CODE_EXECUTION_READ_TIMEOUT: Optional[float] = Field( | |||
| description="read timeout in seconds for code execution request", | |||
| description="Read timeout in seconds for code execution requests", | |||
| default=60.0, | |||
| ) | |||
| CODE_EXECUTION_WRITE_TIMEOUT: Optional[float] = Field( | |||
| description="write timeout in seconds for code execution request", | |||
| description="Write timeout in seconds for code execution request", | |||
| default=10.0, | |||
| ) | |||
| CODE_MAX_NUMBER: PositiveInt = Field( | |||
| description="max depth for code execution", | |||
| description="Maximum allowed numeric value in code execution", | |||
| default=9223372036854775807, | |||
| ) | |||
| CODE_MIN_NUMBER: NegativeInt = Field( | |||
| description="", | |||
| description="Minimum allowed numeric value in code execution", | |||
| default=-9223372036854775807, | |||
| ) | |||
| CODE_MAX_DEPTH: PositiveInt = Field( | |||
| description="max depth for code execution", | |||
| description="Maximum allowed depth for nested structures in code execution", | |||
| default=5, | |||
| ) | |||
| CODE_MAX_PRECISION: PositiveInt = Field( | |||
| description="max precision digits for float type in code execution", | |||
| description="mMaximum number of decimal places for floating-point numbers in code execution", | |||
| default=20, | |||
| ) | |||
| CODE_MAX_STRING_LENGTH: PositiveInt = Field( | |||
| description="max string length for code execution", | |||
| description="Maximum allowed length for strings in code execution", | |||
| default=80000, | |||
| ) | |||
| CODE_MAX_STRING_ARRAY_LENGTH: PositiveInt = Field( | |||
| description="", | |||
| description="Maximum allowed length for string arrays in code execution", | |||
| default=30, | |||
| ) | |||
| CODE_MAX_OBJECT_ARRAY_LENGTH: PositiveInt = Field( | |||
| description="", | |||
| description="Maximum allowed length for object arrays in code execution", | |||
| default=30, | |||
| ) | |||
| CODE_MAX_NUMBER_ARRAY_LENGTH: PositiveInt = Field( | |||
| description="", | |||
| description="Maximum allowed length for numeric arrays in code execution", | |||
| default=1000, | |||
| ) | |||
| class EndpointConfig(BaseSettings): | |||
| """ | |||
| Module URL configs | |||
| Configuration for various application endpoints and URLs | |||
| """ | |||
| CONSOLE_API_URL: str = Field( | |||
| description="The backend URL prefix of the console API." | |||
| "used to concatenate the login authorization callback or notion integration callback.", | |||
| description="Base URL for the console API," | |||
| "used for login authentication callback or notion integration callbacks", | |||
| default="", | |||
| ) | |||
| CONSOLE_WEB_URL: str = Field( | |||
| description="The front-end URL prefix of the console web." | |||
| "used to concatenate some front-end addresses and for CORS configuration use.", | |||
| description="Base URL for the console web interface," "used for frontend references and CORS configuration", | |||
| default="", | |||
| ) | |||
| SERVICE_API_URL: str = Field( | |||
| description="Service API Url prefix. used to display Service API Base Url to the front-end.", | |||
| description="Base URL for the service API, displayed to users for API access", | |||
| default="", | |||
| ) | |||
| APP_WEB_URL: str = Field( | |||
| description="WebApp Url prefix. used to display WebAPP API Base Url to the front-end.", | |||
| description="Base URL for the web application, used for frontend references", | |||
| default="", | |||
| ) | |||
| class FileAccessConfig(BaseSettings): | |||
| """ | |||
| File Access configs | |||
| Configuration for file access and handling | |||
| """ | |||
| FILES_URL: str = Field( | |||
| description="File preview or download Url prefix." | |||
| " used to display File preview or download Url to the front-end or as Multi-model inputs;" | |||
| description="Base URL for file preview or download," | |||
| " used for frontend display and multi-model inputs" | |||
| "Url is signed and has expiration time.", | |||
| validation_alias=AliasChoices("FILES_URL", "CONSOLE_API_URL"), | |||
| alias_priority=1, | |||
| @@ -154,49 +152,49 @@ class FileAccessConfig(BaseSettings): | |||
| ) | |||
| FILES_ACCESS_TIMEOUT: int = Field( | |||
| description="timeout in seconds for file accessing", | |||
| description="Expiration time in seconds for file access URLs", | |||
| default=300, | |||
| ) | |||
| class FileUploadConfig(BaseSettings): | |||
| """ | |||
| File Uploading configs | |||
| Configuration for file upload limitations | |||
| """ | |||
| UPLOAD_FILE_SIZE_LIMIT: NonNegativeInt = Field( | |||
| description="size limit in Megabytes for uploading files", | |||
| description="Maximum allowed file size for uploads in megabytes", | |||
| default=15, | |||
| ) | |||
| UPLOAD_FILE_BATCH_LIMIT: NonNegativeInt = Field( | |||
| description="batch size limit for uploading files", | |||
| description="Maximum number of files allowed in a single upload batch", | |||
| default=5, | |||
| ) | |||
| UPLOAD_IMAGE_FILE_SIZE_LIMIT: NonNegativeInt = Field( | |||
| description="image file size limit in Megabytes for uploading files", | |||
| description="Maximum allowed image file size for uploads in megabytes", | |||
| default=10, | |||
| ) | |||
| BATCH_UPLOAD_LIMIT: NonNegativeInt = Field( | |||
| description="", # todo: to be clarified | |||
| description="Maximum number of files allowed in a batch upload operation", | |||
| default=20, | |||
| ) | |||
| class HttpConfig(BaseSettings): | |||
| """ | |||
| HTTP configs | |||
| HTTP-related configurations for the application | |||
| """ | |||
| API_COMPRESSION_ENABLED: bool = Field( | |||
| description="whether to enable HTTP response compression of gzip", | |||
| description="Enable or disable gzip compression for HTTP responses", | |||
| default=False, | |||
| ) | |||
| inner_CONSOLE_CORS_ALLOW_ORIGINS: str = Field( | |||
| description="", | |||
| description="Comma-separated list of allowed origins for CORS in the console", | |||
| validation_alias=AliasChoices("CONSOLE_CORS_ALLOW_ORIGINS", "CONSOLE_WEB_URL"), | |||
| default="", | |||
| ) | |||
| @@ -218,359 +216,360 @@ class HttpConfig(BaseSettings): | |||
| return self.inner_WEB_API_CORS_ALLOW_ORIGINS.split(",") | |||
| HTTP_REQUEST_MAX_CONNECT_TIMEOUT: Annotated[ | |||
| PositiveInt, Field(ge=10, description="connect timeout in seconds for HTTP request") | |||
| PositiveInt, Field(ge=10, description="Maximum connection timeout in seconds for HTTP requests") | |||
| ] = 10 | |||
| HTTP_REQUEST_MAX_READ_TIMEOUT: Annotated[ | |||
| PositiveInt, Field(ge=60, description="read timeout in seconds for HTTP request") | |||
| PositiveInt, Field(ge=60, description="Maximum read timeout in seconds for HTTP requests") | |||
| ] = 60 | |||
| HTTP_REQUEST_MAX_WRITE_TIMEOUT: Annotated[ | |||
| PositiveInt, Field(ge=10, description="read timeout in seconds for HTTP request") | |||
| PositiveInt, Field(ge=10, description="Maximum write timeout in seconds for HTTP requests") | |||
| ] = 20 | |||
| HTTP_REQUEST_NODE_MAX_BINARY_SIZE: PositiveInt = Field( | |||
| description="", | |||
| description="Maximum allowed size in bytes for binary data in HTTP requests", | |||
| default=10 * 1024 * 1024, | |||
| ) | |||
| HTTP_REQUEST_NODE_MAX_TEXT_SIZE: PositiveInt = Field( | |||
| description="", | |||
| description="Maximum allowed size in bytes for text data in HTTP requests", | |||
| default=1 * 1024 * 1024, | |||
| ) | |||
| SSRF_PROXY_HTTP_URL: Optional[str] = Field( | |||
| description="HTTP URL for SSRF proxy", | |||
| description="Proxy URL for HTTP requests to prevent Server-Side Request Forgery (SSRF)", | |||
| default=None, | |||
| ) | |||
| SSRF_PROXY_HTTPS_URL: Optional[str] = Field( | |||
| description="HTTPS URL for SSRF proxy", | |||
| description="Proxy URL for HTTPS requests to prevent Server-Side Request Forgery (SSRF)", | |||
| default=None, | |||
| ) | |||
| class InnerAPIConfig(BaseSettings): | |||
| """ | |||
| Inner API configs | |||
| Configuration for internal API functionality | |||
| """ | |||
| INNER_API: bool = Field( | |||
| description="whether to enable the inner API", | |||
| description="Enable or disable the internal API", | |||
| default=False, | |||
| ) | |||
| INNER_API_KEY: Optional[str] = Field( | |||
| description="The inner API key is used to authenticate the inner API", | |||
| description="API key for accessing the internal API", | |||
| default=None, | |||
| ) | |||
| class LoggingConfig(BaseSettings): | |||
| """ | |||
| Logging configs | |||
| Configuration for application logging | |||
| """ | |||
| LOG_LEVEL: str = Field( | |||
| description="Log output level, default to INFO. It is recommended to set it to ERROR for production.", | |||
| description="Logging level, default to INFO. Set to ERROR for production environments.", | |||
| default="INFO", | |||
| ) | |||
| LOG_FILE: Optional[str] = Field( | |||
| description="logging output file path", | |||
| description="File path for log output.", | |||
| default=None, | |||
| ) | |||
| LOG_FORMAT: str = Field( | |||
| description="log format", | |||
| description="Format string for log messages", | |||
| default="%(asctime)s.%(msecs)03d %(levelname)s [%(threadName)s] [%(filename)s:%(lineno)d] - %(message)s", | |||
| ) | |||
| LOG_DATEFORMAT: Optional[str] = Field( | |||
| description="log date format", | |||
| description="Date format string for log timestamps", | |||
| default=None, | |||
| ) | |||
| LOG_TZ: Optional[str] = Field( | |||
| description="specify log timezone, eg: America/New_York", | |||
| description="Timezone for log timestamps (e.g., 'America/New_York')", | |||
| default=None, | |||
| ) | |||
| class ModelLoadBalanceConfig(BaseSettings): | |||
| """ | |||
| Model load balance configs | |||
| Configuration for model load balancing | |||
| """ | |||
| MODEL_LB_ENABLED: bool = Field( | |||
| description="whether to enable model load balancing", | |||
| description="Enable or disable load balancing for models", | |||
| default=False, | |||
| ) | |||
| class BillingConfig(BaseSettings): | |||
| """ | |||
| Platform Billing Configurations | |||
| Configuration for platform billing features | |||
| """ | |||
| BILLING_ENABLED: bool = Field( | |||
| description="whether to enable billing", | |||
| description="Enable or disable billing functionality", | |||
| default=False, | |||
| ) | |||
| class UpdateConfig(BaseSettings): | |||
| """ | |||
| Update configs | |||
| Configuration for application update checks | |||
| """ | |||
| CHECK_UPDATE_URL: str = Field( | |||
| description="url for checking updates", | |||
| description="URL to check for application updates", | |||
| default="https://updates.dify.ai", | |||
| ) | |||
| class WorkflowConfig(BaseSettings): | |||
| """ | |||
| Workflow feature configs | |||
| Configuration for workflow execution | |||
| """ | |||
| WORKFLOW_MAX_EXECUTION_STEPS: PositiveInt = Field( | |||
| description="max execution steps in single workflow execution", | |||
| description="Maximum number of steps allowed in a single workflow execution", | |||
| default=500, | |||
| ) | |||
| WORKFLOW_MAX_EXECUTION_TIME: PositiveInt = Field( | |||
| description="max execution time in seconds in single workflow execution", | |||
| description="Maximum execution time in seconds for a single workflow", | |||
| default=1200, | |||
| ) | |||
| WORKFLOW_CALL_MAX_DEPTH: PositiveInt = Field( | |||
| description="max depth of calling in single workflow execution", | |||
| description="Maximum allowed depth for nested workflow calls", | |||
| default=5, | |||
| ) | |||
| MAX_VARIABLE_SIZE: PositiveInt = Field( | |||
| description="The maximum size in bytes of a variable. default to 5KB.", | |||
| description="Maximum size in bytes for a single variable in workflows. Default to 5KB.", | |||
| default=5 * 1024, | |||
| ) | |||
| class OAuthConfig(BaseSettings): | |||
| """ | |||
| oauth configs | |||
| Configuration for OAuth authentication | |||
| """ | |||
| OAUTH_REDIRECT_PATH: str = Field( | |||
| description="redirect path for OAuth", | |||
| description="Redirect path for OAuth authentication callbacks", | |||
| default="/console/api/oauth/authorize", | |||
| ) | |||
| GITHUB_CLIENT_ID: Optional[str] = Field( | |||
| description="GitHub client id for OAuth", | |||
| description="GitHub OAuth client secret", | |||
| default=None, | |||
| ) | |||
| GITHUB_CLIENT_SECRET: Optional[str] = Field( | |||
| description="GitHub client secret key for OAuth", | |||
| description="GitHub OAuth client secret", | |||
| default=None, | |||
| ) | |||
| GOOGLE_CLIENT_ID: Optional[str] = Field( | |||
| description="Google client id for OAuth", | |||
| description="Google OAuth client ID", | |||
| default=None, | |||
| ) | |||
| GOOGLE_CLIENT_SECRET: Optional[str] = Field( | |||
| description="Google client secret key for OAuth", | |||
| description="Google OAuth client secret", | |||
| default=None, | |||
| ) | |||
| class ModerationConfig(BaseSettings): | |||
| """ | |||
| Moderation in app configs. | |||
| Configuration for content moderation | |||
| """ | |||
| MODERATION_BUFFER_SIZE: PositiveInt = Field( | |||
| description="buffer size for moderation", | |||
| description="Size of the buffer for content moderation processing", | |||
| default=300, | |||
| ) | |||
| class ToolConfig(BaseSettings): | |||
| """ | |||
| Tool configs | |||
| Configuration for tool management | |||
| """ | |||
| TOOL_ICON_CACHE_MAX_AGE: PositiveInt = Field( | |||
| description="max age in seconds for tool icon caching", | |||
| description="Maximum age in seconds for caching tool icons", | |||
| default=3600, | |||
| ) | |||
| class MailConfig(BaseSettings): | |||
| """ | |||
| Mail Configurations | |||
| Configuration for email services | |||
| """ | |||
| MAIL_TYPE: Optional[str] = Field( | |||
| description="Mail provider type name, default to None, available values are `smtp` and `resend`.", | |||
| description="Email service provider type ('smtp' or 'resend'), default to None.", | |||
| default=None, | |||
| ) | |||
| MAIL_DEFAULT_SEND_FROM: Optional[str] = Field( | |||
| description="default email address for sending from ", | |||
| description="Default email address to use as the sender", | |||
| default=None, | |||
| ) | |||
| RESEND_API_KEY: Optional[str] = Field( | |||
| description="API key for Resend", | |||
| description="API key for Resend email service", | |||
| default=None, | |||
| ) | |||
| RESEND_API_URL: Optional[str] = Field( | |||
| description="API URL for Resend", | |||
| description="API URL for Resend email service", | |||
| default=None, | |||
| ) | |||
| SMTP_SERVER: Optional[str] = Field( | |||
| description="smtp server host", | |||
| description="SMTP server hostname", | |||
| default=None, | |||
| ) | |||
| SMTP_PORT: Optional[int] = Field( | |||
| description="smtp server port", | |||
| description="SMTP server port number", | |||
| default=465, | |||
| ) | |||
| SMTP_USERNAME: Optional[str] = Field( | |||
| description="smtp server username", | |||
| description="Username for SMTP authentication", | |||
| default=None, | |||
| ) | |||
| SMTP_PASSWORD: Optional[str] = Field( | |||
| description="smtp server password", | |||
| description="Password for SMTP authentication", | |||
| default=None, | |||
| ) | |||
| SMTP_USE_TLS: bool = Field( | |||
| description="whether to use TLS connection to smtp server", | |||
| description="Enable TLS encryption for SMTP connections", | |||
| default=False, | |||
| ) | |||
| SMTP_OPPORTUNISTIC_TLS: bool = Field( | |||
| description="whether to use opportunistic TLS connection to smtp server", | |||
| description="Enable opportunistic TLS for SMTP connections", | |||
| default=False, | |||
| ) | |||
| class RagEtlConfig(BaseSettings): | |||
| """ | |||
| RAG ETL Configurations. | |||
| Configuration for RAG ETL processes | |||
| """ | |||
| ETL_TYPE: str = Field( | |||
| description="RAG ETL type name, default to `dify`, available values are `dify` and `Unstructured`. ", | |||
| description="RAG ETL type ('dify' or 'Unstructured'), default to 'dify'", | |||
| default="dify", | |||
| ) | |||
| KEYWORD_DATA_SOURCE_TYPE: str = Field( | |||
| description="source type for keyword data, default to `database`, available values are `database` .", | |||
| description="Data source type for keyword extraction" | |||
| " ('database' or other supported types), default to 'database'", | |||
| default="database", | |||
| ) | |||
| UNSTRUCTURED_API_URL: Optional[str] = Field( | |||
| description="API URL for Unstructured", | |||
| description="API URL for Unstructured.io service", | |||
| default=None, | |||
| ) | |||
| UNSTRUCTURED_API_KEY: Optional[str] = Field( | |||
| description="API key for Unstructured", | |||
| description="API key for Unstructured.io service", | |||
| default=None, | |||
| ) | |||
| class DataSetConfig(BaseSettings): | |||
| """ | |||
| Dataset configs | |||
| Configuration for dataset management | |||
| """ | |||
| CLEAN_DAY_SETTING: PositiveInt = Field( | |||
| description="interval in days for cleaning up dataset", | |||
| description="Interval in days for dataset cleanup operations", | |||
| default=30, | |||
| ) | |||
| DATASET_OPERATOR_ENABLED: bool = Field( | |||
| description="whether to enable dataset operator", | |||
| description="Enable or disable dataset operator functionality", | |||
| default=False, | |||
| ) | |||
| class WorkspaceConfig(BaseSettings): | |||
| """ | |||
| Workspace configs | |||
| Configuration for workspace management | |||
| """ | |||
| INVITE_EXPIRY_HOURS: PositiveInt = Field( | |||
| description="workspaces invitation expiration in hours", | |||
| description="Expiration time in hours for workspace invitation links", | |||
| default=72, | |||
| ) | |||
| class IndexingConfig(BaseSettings): | |||
| """ | |||
| Indexing configs. | |||
| Configuration for indexing operations | |||
| """ | |||
| INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: PositiveInt = Field( | |||
| description="max segmentation token length for indexing", | |||
| description="Maximum token length for text segmentation during indexing", | |||
| default=1000, | |||
| ) | |||
| class ImageFormatConfig(BaseSettings): | |||
| MULTIMODAL_SEND_IMAGE_FORMAT: str = Field( | |||
| description="multi model send image format, support base64, url, default is base64", | |||
| description="Format for sending images in multimodal contexts ('base64' or 'url'), default is base64", | |||
| default="base64", | |||
| ) | |||
| class CeleryBeatConfig(BaseSettings): | |||
| CELERY_BEAT_SCHEDULER_TIME: int = Field( | |||
| description="the time of the celery scheduler, default to 1 day", | |||
| description="Interval in days for Celery Beat scheduler execution, default to 1 day", | |||
| default=1, | |||
| ) | |||
| class PositionConfig(BaseSettings): | |||
| POSITION_PROVIDER_PINS: str = Field( | |||
| description="The heads of model providers", | |||
| description="Comma-separated list of pinned model providers", | |||
| default="", | |||
| ) | |||
| POSITION_PROVIDER_INCLUDES: str = Field( | |||
| description="The included model providers", | |||
| description="Comma-separated list of included model providers", | |||
| default="", | |||
| ) | |||
| POSITION_PROVIDER_EXCLUDES: str = Field( | |||
| description="The excluded model providers", | |||
| description="Comma-separated list of excluded model providers", | |||
| default="", | |||
| ) | |||
| POSITION_TOOL_PINS: str = Field( | |||
| description="The heads of tools", | |||
| description="Comma-separated list of pinned tools", | |||
| default="", | |||
| ) | |||
| POSITION_TOOL_INCLUDES: str = Field( | |||
| description="The included tools", | |||
| description="Comma-separated list of included tools", | |||
| default="", | |||
| ) | |||
| POSITION_TOOL_EXCLUDES: str = Field( | |||
| description="The excluded tools", | |||
| description="Comma-separated list of excluded tools", | |||
| default="", | |||
| ) | |||
| @@ -6,31 +6,31 @@ from pydantic_settings import BaseSettings | |||
| class HostedOpenAiConfig(BaseSettings): | |||
| """ | |||
| Hosted OpenAI service config | |||
| Configuration for hosted OpenAI service | |||
| """ | |||
| HOSTED_OPENAI_API_KEY: Optional[str] = Field( | |||
| description="", | |||
| description="API key for hosted OpenAI service", | |||
| default=None, | |||
| ) | |||
| HOSTED_OPENAI_API_BASE: Optional[str] = Field( | |||
| description="", | |||
| description="Base URL for hosted OpenAI API", | |||
| default=None, | |||
| ) | |||
| HOSTED_OPENAI_API_ORGANIZATION: Optional[str] = Field( | |||
| description="", | |||
| description="Organization ID for hosted OpenAI service", | |||
| default=None, | |||
| ) | |||
| HOSTED_OPENAI_TRIAL_ENABLED: bool = Field( | |||
| description="", | |||
| description="Enable trial access to hosted OpenAI service", | |||
| default=False, | |||
| ) | |||
| HOSTED_OPENAI_TRIAL_MODELS: str = Field( | |||
| description="", | |||
| description="Comma-separated list of available models for trial access", | |||
| default="gpt-3.5-turbo," | |||
| "gpt-3.5-turbo-1106," | |||
| "gpt-3.5-turbo-instruct," | |||
| @@ -42,17 +42,17 @@ class HostedOpenAiConfig(BaseSettings): | |||
| ) | |||
| HOSTED_OPENAI_QUOTA_LIMIT: NonNegativeInt = Field( | |||
| description="", | |||
| description="Quota limit for hosted OpenAI service usage", | |||
| default=200, | |||
| ) | |||
| HOSTED_OPENAI_PAID_ENABLED: bool = Field( | |||
| description="", | |||
| description="Enable paid access to hosted OpenAI service", | |||
| default=False, | |||
| ) | |||
| HOSTED_OPENAI_PAID_MODELS: str = Field( | |||
| description="", | |||
| description="Comma-separated list of available models for paid access", | |||
| default="gpt-4," | |||
| "gpt-4-turbo-preview," | |||
| "gpt-4-turbo-2024-04-09," | |||
| @@ -71,124 +71,122 @@ class HostedOpenAiConfig(BaseSettings): | |||
| class HostedAzureOpenAiConfig(BaseSettings): | |||
| """ | |||
| Hosted OpenAI service config | |||
| Configuration for hosted Azure OpenAI service | |||
| """ | |||
| HOSTED_AZURE_OPENAI_ENABLED: bool = Field( | |||
| description="", | |||
| description="Enable hosted Azure OpenAI service", | |||
| default=False, | |||
| ) | |||
| HOSTED_AZURE_OPENAI_API_KEY: Optional[str] = Field( | |||
| description="", | |||
| description="API key for hosted Azure OpenAI service", | |||
| default=None, | |||
| ) | |||
| HOSTED_AZURE_OPENAI_API_BASE: Optional[str] = Field( | |||
| description="", | |||
| description="Base URL for hosted Azure OpenAI API", | |||
| default=None, | |||
| ) | |||
| HOSTED_AZURE_OPENAI_QUOTA_LIMIT: NonNegativeInt = Field( | |||
| description="", | |||
| description="Quota limit for hosted Azure OpenAI service usage", | |||
| default=200, | |||
| ) | |||
| class HostedAnthropicConfig(BaseSettings): | |||
| """ | |||
| Hosted Azure OpenAI service config | |||
| Configuration for hosted Anthropic service | |||
| """ | |||
| HOSTED_ANTHROPIC_API_BASE: Optional[str] = Field( | |||
| description="", | |||
| description="Base URL for hosted Anthropic API", | |||
| default=None, | |||
| ) | |||
| HOSTED_ANTHROPIC_API_KEY: Optional[str] = Field( | |||
| description="", | |||
| description="API key for hosted Anthropic service", | |||
| default=None, | |||
| ) | |||
| HOSTED_ANTHROPIC_TRIAL_ENABLED: bool = Field( | |||
| description="", | |||
| description="Enable trial access to hosted Anthropic service", | |||
| default=False, | |||
| ) | |||
| HOSTED_ANTHROPIC_QUOTA_LIMIT: NonNegativeInt = Field( | |||
| description="", | |||
| description="Quota limit for hosted Anthropic service usage", | |||
| default=600000, | |||
| ) | |||
| HOSTED_ANTHROPIC_PAID_ENABLED: bool = Field( | |||
| description="", | |||
| description="Enable paid access to hosted Anthropic service", | |||
| default=False, | |||
| ) | |||
| class HostedMinmaxConfig(BaseSettings): | |||
| """ | |||
| Hosted Minmax service config | |||
| Configuration for hosted Minmax service | |||
| """ | |||
| HOSTED_MINIMAX_ENABLED: bool = Field( | |||
| description="", | |||
| description="Enable hosted Minmax service", | |||
| default=False, | |||
| ) | |||
| class HostedSparkConfig(BaseSettings): | |||
| """ | |||
| Hosted Spark service config | |||
| Configuration for hosted Spark service | |||
| """ | |||
| HOSTED_SPARK_ENABLED: bool = Field( | |||
| description="", | |||
| description="Enable hosted Spark service", | |||
| default=False, | |||
| ) | |||
| class HostedZhipuAIConfig(BaseSettings): | |||
| """ | |||
| Hosted Minmax service config | |||
| Configuration for hosted ZhipuAI service | |||
| """ | |||
| HOSTED_ZHIPUAI_ENABLED: bool = Field( | |||
| description="", | |||
| description="Enable hosted ZhipuAI service", | |||
| default=False, | |||
| ) | |||
| class HostedModerationConfig(BaseSettings): | |||
| """ | |||
| Hosted Moderation service config | |||
| Configuration for hosted Moderation service | |||
| """ | |||
| HOSTED_MODERATION_ENABLED: bool = Field( | |||
| description="", | |||
| description="Enable hosted Moderation service", | |||
| default=False, | |||
| ) | |||
| HOSTED_MODERATION_PROVIDERS: str = Field( | |||
| description="", | |||
| description="Comma-separated list of moderation providers", | |||
| default="", | |||
| ) | |||
| class HostedFetchAppTemplateConfig(BaseSettings): | |||
| """ | |||
| Hosted Moderation service config | |||
| Configuration for fetching app templates | |||
| """ | |||
| HOSTED_FETCH_APP_TEMPLATES_MODE: str = Field( | |||
| description="the mode for fetching app templates," | |||
| " default to remote," | |||
| " available values: remote, db, builtin", | |||
| description="Mode for fetching app templates: remote, db, or builtin" " default to remote,", | |||
| default="remote", | |||
| ) | |||
| HOSTED_FETCH_APP_TEMPLATES_REMOTE_DOMAIN: str = Field( | |||
| description="the domain for fetching remote app templates", | |||
| description="Domain for fetching remote app templates", | |||
| default="https://tmpl.dify.ai", | |||
| ) | |||
| @@ -31,70 +31,71 @@ from configs.middleware.vdb.weaviate_config import WeaviateConfig | |||
| class StorageConfig(BaseSettings): | |||
| STORAGE_TYPE: str = Field( | |||
| description="storage type," | |||
| " default to `local`," | |||
| " available values are `local`, `s3`, `azure-blob`, `aliyun-oss`, `google-storage`.", | |||
| description="Type of storage to use." | |||
| " Options: 'local', 's3', 'azure-blob', 'aliyun-oss', 'google-storage'. Default is 'local'.", | |||
| default="local", | |||
| ) | |||
| STORAGE_LOCAL_PATH: str = Field( | |||
| description="local storage path", | |||
| description="Path for local storage when STORAGE_TYPE is set to 'local'.", | |||
| default="storage", | |||
| ) | |||
| class VectorStoreConfig(BaseSettings): | |||
| VECTOR_STORE: Optional[str] = Field( | |||
| description="vector store type", | |||
| description="Type of vector store to use for efficient similarity search." | |||
| " Set to None if not using a vector store.", | |||
| default=None, | |||
| ) | |||
| class KeywordStoreConfig(BaseSettings): | |||
| KEYWORD_STORE: str = Field( | |||
| description="keyword store type", | |||
| description="Method for keyword extraction and storage." | |||
| " Default is 'jieba', a Chinese text segmentation library.", | |||
| default="jieba", | |||
| ) | |||
| class DatabaseConfig: | |||
| DB_HOST: str = Field( | |||
| description="db host", | |||
| description="Hostname or IP address of the database server.", | |||
| default="localhost", | |||
| ) | |||
| DB_PORT: PositiveInt = Field( | |||
| description="db port", | |||
| description="Port number for database connection.", | |||
| default=5432, | |||
| ) | |||
| DB_USERNAME: str = Field( | |||
| description="db username", | |||
| description="Username for database authentication.", | |||
| default="postgres", | |||
| ) | |||
| DB_PASSWORD: str = Field( | |||
| description="db password", | |||
| description="Password for database authentication.", | |||
| default="", | |||
| ) | |||
| DB_DATABASE: str = Field( | |||
| description="db database", | |||
| description="Name of the database to connect to.", | |||
| default="dify", | |||
| ) | |||
| DB_CHARSET: str = Field( | |||
| description="db charset", | |||
| description="Character set for database connection.", | |||
| default="", | |||
| ) | |||
| DB_EXTRAS: str = Field( | |||
| description="db extras options. Example: keepalives_idle=60&keepalives=1", | |||
| description="Additional database connection parameters. Example: 'keepalives_idle=60&keepalives=1'", | |||
| default="", | |||
| ) | |||
| SQLALCHEMY_DATABASE_URI_SCHEME: str = Field( | |||
| description="db uri scheme", | |||
| description="Database URI scheme for SQLAlchemy connection.", | |||
| default="postgresql", | |||
| ) | |||
| @@ -112,27 +113,27 @@ class DatabaseConfig: | |||
| ) | |||
| SQLALCHEMY_POOL_SIZE: NonNegativeInt = Field( | |||
| description="pool size of SqlAlchemy", | |||
| description="Maximum number of database connections in the pool.", | |||
| default=30, | |||
| ) | |||
| SQLALCHEMY_MAX_OVERFLOW: NonNegativeInt = Field( | |||
| description="max overflows for SqlAlchemy", | |||
| description="Maximum number of connections that can be created beyond the pool_size.", | |||
| default=10, | |||
| ) | |||
| SQLALCHEMY_POOL_RECYCLE: NonNegativeInt = Field( | |||
| description="SqlAlchemy pool recycle", | |||
| description="Number of seconds after which a connection is automatically recycled.", | |||
| default=3600, | |||
| ) | |||
| SQLALCHEMY_POOL_PRE_PING: bool = Field( | |||
| description="whether to enable pool pre-ping in SqlAlchemy", | |||
| description="If True, enables connection pool pre-ping feature to check connections.", | |||
| default=False, | |||
| ) | |||
| SQLALCHEMY_ECHO: bool | str = Field( | |||
| description="whether to enable SqlAlchemy echo", | |||
| description="If True, SQLAlchemy will log all SQL statements.", | |||
| default=False, | |||
| ) | |||
| @@ -150,27 +151,27 @@ class DatabaseConfig: | |||
| class CeleryConfig(DatabaseConfig): | |||
| CELERY_BACKEND: str = Field( | |||
| description="Celery backend, available values are `database`, `redis`", | |||
| description="Backend for Celery task results. Options: 'database', 'redis'.", | |||
| default="database", | |||
| ) | |||
| CELERY_BROKER_URL: Optional[str] = Field( | |||
| description="CELERY_BROKER_URL", | |||
| description="URL of the message broker for Celery tasks.", | |||
| default=None, | |||
| ) | |||
| CELERY_USE_SENTINEL: Optional[bool] = Field( | |||
| description="Whether to use Redis Sentinel mode", | |||
| description="Whether to use Redis Sentinel for high availability.", | |||
| default=False, | |||
| ) | |||
| CELERY_SENTINEL_MASTER_NAME: Optional[str] = Field( | |||
| description="Redis Sentinel master name", | |||
| description="Name of the Redis Sentinel master.", | |||
| default=None, | |||
| ) | |||
| CELERY_SENTINEL_SOCKET_TIMEOUT: Optional[PositiveFloat] = Field( | |||
| description="Redis Sentinel socket timeout", | |||
| description="Timeout for Redis Sentinel socket operations in seconds.", | |||
| default=0.1, | |||
| ) | |||
| @@ -6,65 +6,65 @@ from pydantic_settings import BaseSettings | |||
| class RedisConfig(BaseSettings): | |||
| """ | |||
| Redis configs | |||
| Configuration settings for Redis connection | |||
| """ | |||
| REDIS_HOST: str = Field( | |||
| description="Redis host", | |||
| description="Hostname or IP address of the Redis server", | |||
| default="localhost", | |||
| ) | |||
| REDIS_PORT: PositiveInt = Field( | |||
| description="Redis port", | |||
| description="Port number on which the Redis server is listening", | |||
| default=6379, | |||
| ) | |||
| REDIS_USERNAME: Optional[str] = Field( | |||
| description="Redis username", | |||
| description="Username for Redis authentication (if required)", | |||
| default=None, | |||
| ) | |||
| REDIS_PASSWORD: Optional[str] = Field( | |||
| description="Redis password", | |||
| description="Password for Redis authentication (if required)", | |||
| default=None, | |||
| ) | |||
| REDIS_DB: NonNegativeInt = Field( | |||
| description="Redis database id, default to 0", | |||
| description="Redis database number to use (0-15)", | |||
| default=0, | |||
| ) | |||
| REDIS_USE_SSL: bool = Field( | |||
| description="whether to use SSL for Redis connection", | |||
| description="Enable SSL/TLS for the Redis connection", | |||
| default=False, | |||
| ) | |||
| REDIS_USE_SENTINEL: Optional[bool] = Field( | |||
| description="Whether to use Redis Sentinel mode", | |||
| description="Enable Redis Sentinel mode for high availability", | |||
| default=False, | |||
| ) | |||
| REDIS_SENTINELS: Optional[str] = Field( | |||
| description="Redis Sentinel nodes", | |||
| description="Comma-separated list of Redis Sentinel nodes (host:port)", | |||
| default=None, | |||
| ) | |||
| REDIS_SENTINEL_SERVICE_NAME: Optional[str] = Field( | |||
| description="Redis Sentinel service name", | |||
| description="Name of the Redis Sentinel service to monitor", | |||
| default=None, | |||
| ) | |||
| REDIS_SENTINEL_USERNAME: Optional[str] = Field( | |||
| description="Redis Sentinel username", | |||
| description="Username for Redis Sentinel authentication (if required)", | |||
| default=None, | |||
| ) | |||
| REDIS_SENTINEL_PASSWORD: Optional[str] = Field( | |||
| description="Redis Sentinel password", | |||
| description="Password for Redis Sentinel authentication (if required)", | |||
| default=None, | |||
| ) | |||
| REDIS_SENTINEL_SOCKET_TIMEOUT: Optional[PositiveFloat] = Field( | |||
| description="Redis Sentinel socket timeout", | |||
| description="Socket timeout in seconds for Redis Sentinel connections", | |||
| default=0.1, | |||
| ) | |||
| @@ -6,40 +6,40 @@ from pydantic_settings import BaseSettings | |||
| class AliyunOSSStorageConfig(BaseSettings): | |||
| """ | |||
| Aliyun storage configs | |||
| Configuration settings for Aliyun Object Storage Service (OSS) | |||
| """ | |||
| ALIYUN_OSS_BUCKET_NAME: Optional[str] = Field( | |||
| description="Aliyun OSS bucket name", | |||
| description="Name of the Aliyun OSS bucket to store and retrieve objects", | |||
| default=None, | |||
| ) | |||
| ALIYUN_OSS_ACCESS_KEY: Optional[str] = Field( | |||
| description="Aliyun OSS access key", | |||
| description="Access key ID for authenticating with Aliyun OSS", | |||
| default=None, | |||
| ) | |||
| ALIYUN_OSS_SECRET_KEY: Optional[str] = Field( | |||
| description="Aliyun OSS secret key", | |||
| description="Secret access key for authenticating with Aliyun OSS", | |||
| default=None, | |||
| ) | |||
| ALIYUN_OSS_ENDPOINT: Optional[str] = Field( | |||
| description="Aliyun OSS endpoint URL", | |||
| description="URL of the Aliyun OSS endpoint for your chosen region", | |||
| default=None, | |||
| ) | |||
| ALIYUN_OSS_REGION: Optional[str] = Field( | |||
| description="Aliyun OSS region", | |||
| description="Aliyun OSS region where your bucket is located (e.g., 'oss-cn-hangzhou')", | |||
| default=None, | |||
| ) | |||
| ALIYUN_OSS_AUTH_VERSION: Optional[str] = Field( | |||
| description="Aliyun OSS authentication version", | |||
| description="Version of the authentication protocol to use with Aliyun OSS (e.g., 'v4')", | |||
| default=None, | |||
| ) | |||
| ALIYUN_OSS_PATH: Optional[str] = Field( | |||
| description="Aliyun OSS path", | |||
| description="Base path within the bucket to store objects (e.g., 'my-app-data/')", | |||
| default=None, | |||
| ) | |||
| @@ -6,40 +6,40 @@ from pydantic_settings import BaseSettings | |||
| class S3StorageConfig(BaseSettings): | |||
| """ | |||
| S3 storage configs | |||
| Configuration settings for S3-compatible object storage | |||
| """ | |||
| S3_ENDPOINT: Optional[str] = Field( | |||
| description="S3 storage endpoint", | |||
| description="URL of the S3-compatible storage endpoint (e.g., 'https://s3.amazonaws.com')", | |||
| default=None, | |||
| ) | |||
| S3_REGION: Optional[str] = Field( | |||
| description="S3 storage region", | |||
| description="Region where the S3 bucket is located (e.g., 'us-east-1')", | |||
| default=None, | |||
| ) | |||
| S3_BUCKET_NAME: Optional[str] = Field( | |||
| description="S3 storage bucket name", | |||
| description="Name of the S3 bucket to store and retrieve objects", | |||
| default=None, | |||
| ) | |||
| S3_ACCESS_KEY: Optional[str] = Field( | |||
| description="S3 storage access key", | |||
| description="Access key ID for authenticating with the S3 service", | |||
| default=None, | |||
| ) | |||
| S3_SECRET_KEY: Optional[str] = Field( | |||
| description="S3 storage secret key", | |||
| description="Secret access key for authenticating with the S3 service", | |||
| default=None, | |||
| ) | |||
| S3_ADDRESS_STYLE: str = Field( | |||
| description="S3 storage address style", | |||
| description="S3 addressing style: 'auto', 'path', or 'virtual'", | |||
| default="auto", | |||
| ) | |||
| S3_USE_AWS_MANAGED_IAM: bool = Field( | |||
| description="whether to use aws managed IAM for S3", | |||
| description="Use AWS managed IAM roles for authentication instead of access/secret keys", | |||
| default=False, | |||
| ) | |||
| @@ -6,25 +6,25 @@ from pydantic_settings import BaseSettings | |||
| class AzureBlobStorageConfig(BaseSettings): | |||
| """ | |||
| Azure Blob storage configs | |||
| Configuration settings for Azure Blob Storage | |||
| """ | |||
| AZURE_BLOB_ACCOUNT_NAME: Optional[str] = Field( | |||
| description="Azure Blob account name", | |||
| description="Name of the Azure Storage account (e.g., 'mystorageaccount')", | |||
| default=None, | |||
| ) | |||
| AZURE_BLOB_ACCOUNT_KEY: Optional[str] = Field( | |||
| description="Azure Blob account key", | |||
| description="Access key for authenticating with the Azure Storage account", | |||
| default=None, | |||
| ) | |||
| AZURE_BLOB_CONTAINER_NAME: Optional[str] = Field( | |||
| description="Azure Blob container name", | |||
| description="Name of the Azure Blob container to store and retrieve objects", | |||
| default=None, | |||
| ) | |||
| AZURE_BLOB_ACCOUNT_URL: Optional[str] = Field( | |||
| description="Azure Blob account URL", | |||
| description="URL of the Azure Blob storage endpoint (e.g., 'https://mystorageaccount.blob.core.windows.net')", | |||
| default=None, | |||
| ) | |||
| @@ -6,15 +6,15 @@ from pydantic_settings import BaseSettings | |||
| class GoogleCloudStorageConfig(BaseSettings): | |||
| """ | |||
| Google Cloud storage configs | |||
| Configuration settings for Google Cloud Storage | |||
| """ | |||
| GOOGLE_STORAGE_BUCKET_NAME: Optional[str] = Field( | |||
| description="Google Cloud storage bucket name", | |||
| description="Name of the Google Cloud Storage bucket to store and retrieve objects (e.g., 'my-gcs-bucket')", | |||
| default=None, | |||
| ) | |||
| GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64: Optional[str] = Field( | |||
| description="Google Cloud storage service account json base64", | |||
| description="Base64-encoded JSON key file for Google Cloud service account authentication", | |||
| default=None, | |||
| ) | |||
| @@ -5,25 +5,25 @@ from pydantic import BaseModel, Field | |||
| class HuaweiCloudOBSStorageConfig(BaseModel): | |||
| """ | |||
| Huawei Cloud OBS storage configs | |||
| Configuration settings for Huawei Cloud Object Storage Service (OBS) | |||
| """ | |||
| HUAWEI_OBS_BUCKET_NAME: Optional[str] = Field( | |||
| description="Huawei Cloud OBS bucket name", | |||
| description="Name of the Huawei Cloud OBS bucket to store and retrieve objects (e.g., 'my-obs-bucket')", | |||
| default=None, | |||
| ) | |||
| HUAWEI_OBS_ACCESS_KEY: Optional[str] = Field( | |||
| description="Huawei Cloud OBS Access key", | |||
| description="Access Key ID for authenticating with Huawei Cloud OBS", | |||
| default=None, | |||
| ) | |||
| HUAWEI_OBS_SECRET_KEY: Optional[str] = Field( | |||
| description="Huawei Cloud OBS Secret key", | |||
| description="Secret Access Key for authenticating with Huawei Cloud OBS", | |||
| default=None, | |||
| ) | |||
| HUAWEI_OBS_SERVER: Optional[str] = Field( | |||
| description="Huawei Cloud OBS server URL", | |||
| description="Endpoint URL for Huawei Cloud OBS (e.g., 'https://obs.cn-north-4.myhuaweicloud.com')", | |||
| default=None, | |||
| ) | |||
| @@ -6,30 +6,30 @@ from pydantic_settings import BaseSettings | |||
| class OCIStorageConfig(BaseSettings): | |||
| """ | |||
| OCI storage configs | |||
| Configuration settings for Oracle Cloud Infrastructure (OCI) Object Storage | |||
| """ | |||
| OCI_ENDPOINT: Optional[str] = Field( | |||
| description="OCI storage endpoint", | |||
| description="URL of the OCI Object Storage endpoint (e.g., 'https://objectstorage.us-phoenix-1.oraclecloud.com')", | |||
| default=None, | |||
| ) | |||
| OCI_REGION: Optional[str] = Field( | |||
| description="OCI storage region", | |||
| description="OCI region where the bucket is located (e.g., 'us-phoenix-1')", | |||
| default=None, | |||
| ) | |||
| OCI_BUCKET_NAME: Optional[str] = Field( | |||
| description="OCI storage bucket name", | |||
| description="Name of the OCI Object Storage bucket to store and retrieve objects (e.g., 'my-oci-bucket')", | |||
| default=None, | |||
| ) | |||
| OCI_ACCESS_KEY: Optional[str] = Field( | |||
| description="OCI storage access key", | |||
| description="Access key (also known as API key) for authenticating with OCI Object Storage", | |||
| default=None, | |||
| ) | |||
| OCI_SECRET_KEY: Optional[str] = Field( | |||
| description="OCI storage secret key", | |||
| description="Secret key associated with the access key for authenticating with OCI Object Storage", | |||
| default=None, | |||
| ) | |||
| @@ -6,30 +6,30 @@ from pydantic_settings import BaseSettings | |||
| class TencentCloudCOSStorageConfig(BaseSettings): | |||
| """ | |||
| Tencent Cloud COS storage configs | |||
| Configuration settings for Tencent Cloud Object Storage (COS) | |||
| """ | |||
| TENCENT_COS_BUCKET_NAME: Optional[str] = Field( | |||
| description="Tencent Cloud COS bucket name", | |||
| description="Name of the Tencent Cloud COS bucket to store and retrieve objects", | |||
| default=None, | |||
| ) | |||
| TENCENT_COS_REGION: Optional[str] = Field( | |||
| description="Tencent Cloud COS region", | |||
| description="Tencent Cloud region where the COS bucket is located (e.g., 'ap-guangzhou')", | |||
| default=None, | |||
| ) | |||
| TENCENT_COS_SECRET_ID: Optional[str] = Field( | |||
| description="Tencent Cloud COS secret id", | |||
| description="SecretId for authenticating with Tencent Cloud COS (part of API credentials)", | |||
| default=None, | |||
| ) | |||
| TENCENT_COS_SECRET_KEY: Optional[str] = Field( | |||
| description="Tencent Cloud COS secret key", | |||
| description="SecretKey for authenticating with Tencent Cloud COS (part of API credentials)", | |||
| default=None, | |||
| ) | |||
| TENCENT_COS_SCHEME: Optional[str] = Field( | |||
| description="Tencent Cloud COS scheme", | |||
| description="Protocol scheme for COS requests: 'https' (recommended) or 'http'", | |||
| default=None, | |||
| ) | |||
| @@ -5,30 +5,30 @@ from pydantic import BaseModel, Field | |||
| class VolcengineTOSStorageConfig(BaseModel): | |||
| """ | |||
| Volcengine tos storage configs | |||
| Configuration settings for Volcengine Tinder Object Storage (TOS) | |||
| """ | |||
| VOLCENGINE_TOS_BUCKET_NAME: Optional[str] = Field( | |||
| description="Volcengine TOS Bucket Name", | |||
| description="Name of the Volcengine TOS bucket to store and retrieve objects (e.g., 'my-tos-bucket')", | |||
| default=None, | |||
| ) | |||
| VOLCENGINE_TOS_ACCESS_KEY: Optional[str] = Field( | |||
| description="Volcengine TOS Access Key", | |||
| description="Access Key ID for authenticating with Volcengine TOS", | |||
| default=None, | |||
| ) | |||
| VOLCENGINE_TOS_SECRET_KEY: Optional[str] = Field( | |||
| description="Volcengine TOS Secret Key", | |||
| description="Secret Access Key for authenticating with Volcengine TOS", | |||
| default=None, | |||
| ) | |||
| VOLCENGINE_TOS_ENDPOINT: Optional[str] = Field( | |||
| description="Volcengine TOS Endpoint URL", | |||
| description="URL of the Volcengine TOS endpoint (e.g., 'https://tos-cn-beijing.volces.com')", | |||
| default=None, | |||
| ) | |||
| VOLCENGINE_TOS_REGION: Optional[str] = Field( | |||
| description="Volcengine TOS Region", | |||
| description="Volcengine region where the TOS bucket is located (e.g., 'cn-beijing')", | |||
| default=None, | |||
| ) | |||
| @@ -5,33 +5,38 @@ from pydantic import BaseModel, Field | |||
| class AnalyticdbConfig(BaseModel): | |||
| """ | |||
| Configuration for connecting to AnalyticDB. | |||
| Configuration for connecting to Alibaba Cloud AnalyticDB for PostgreSQL. | |||
| Refer to the following documentation for details on obtaining credentials: | |||
| https://www.alibabacloud.com/help/en/analyticdb-for-postgresql/getting-started/create-an-instance-instances-with-vector-engine-optimization-enabled | |||
| """ | |||
| ANALYTICDB_KEY_ID: Optional[str] = Field( | |||
| default=None, description="The Access Key ID provided by Alibaba Cloud for authentication." | |||
| default=None, description="The Access Key ID provided by Alibaba Cloud for API authentication." | |||
| ) | |||
| ANALYTICDB_KEY_SECRET: Optional[str] = Field( | |||
| default=None, description="The Secret Access Key corresponding to the Access Key ID for secure access." | |||
| default=None, description="The Secret Access Key corresponding to the Access Key ID for secure API access." | |||
| ) | |||
| ANALYTICDB_REGION_ID: Optional[str] = Field( | |||
| default=None, description="The region where the AnalyticDB instance is deployed (e.g., 'cn-hangzhou')." | |||
| default=None, | |||
| description="The region where the AnalyticDB instance is deployed (e.g., 'cn-hangzhou', 'ap-southeast-1').", | |||
| ) | |||
| ANALYTICDB_INSTANCE_ID: Optional[str] = Field( | |||
| default=None, | |||
| description="The unique identifier of the AnalyticDB instance you want to connect to (e.g., 'gp-ab123456')..", | |||
| description="The unique identifier of the AnalyticDB instance you want to connect to.", | |||
| ) | |||
| ANALYTICDB_ACCOUNT: Optional[str] = Field( | |||
| default=None, description="The account name used to log in to the AnalyticDB instance." | |||
| default=None, | |||
| description="The account name used to log in to the AnalyticDB instance" | |||
| " (usually the initial account created with the instance).", | |||
| ) | |||
| ANALYTICDB_PASSWORD: Optional[str] = Field( | |||
| default=None, description="The password associated with the AnalyticDB account for authentication." | |||
| default=None, description="The password associated with the AnalyticDB account for database authentication." | |||
| ) | |||
| ANALYTICDB_NAMESPACE: Optional[str] = Field( | |||
| default=None, description="The namespace within AnalyticDB for schema isolation." | |||
| default=None, description="The namespace within AnalyticDB for schema isolation (if using namespace feature)." | |||
| ) | |||
| ANALYTICDB_NAMESPACE_PASSWORD: Optional[str] = Field( | |||
| default=None, description="The password for accessing the specified namespace within the AnalyticDB instance." | |||
| default=None, | |||
| description="The password for accessing the specified namespace within the AnalyticDB instance" | |||
| " (if namespace feature is enabled).", | |||
| ) | |||
| @@ -6,35 +6,35 @@ from pydantic_settings import BaseSettings | |||
| class ChromaConfig(BaseSettings): | |||
| """ | |||
| Chroma configs | |||
| Configuration settings for Chroma vector database | |||
| """ | |||
| CHROMA_HOST: Optional[str] = Field( | |||
| description="Chroma host", | |||
| description="Hostname or IP address of the Chroma server (e.g., 'localhost' or '192.168.1.100')", | |||
| default=None, | |||
| ) | |||
| CHROMA_PORT: PositiveInt = Field( | |||
| description="Chroma port", | |||
| description="Port number on which the Chroma server is listening (default is 8000)", | |||
| default=8000, | |||
| ) | |||
| CHROMA_TENANT: Optional[str] = Field( | |||
| description="Chroma database", | |||
| description="Tenant identifier for multi-tenancy support in Chroma", | |||
| default=None, | |||
| ) | |||
| CHROMA_DATABASE: Optional[str] = Field( | |||
| description="Chroma database", | |||
| description="Name of the Chroma database to connect to", | |||
| default=None, | |||
| ) | |||
| CHROMA_AUTH_PROVIDER: Optional[str] = Field( | |||
| description="Chroma authentication provider", | |||
| description="Authentication provider for Chroma (e.g., 'basic', 'token', or a custom provider)", | |||
| default=None, | |||
| ) | |||
| CHROMA_AUTH_CREDENTIALS: Optional[str] = Field( | |||
| description="Chroma authentication credentials", | |||
| description="Authentication credentials for Chroma (format depends on the auth provider)", | |||
| default=None, | |||
| ) | |||
| @@ -6,25 +6,25 @@ from pydantic_settings import BaseSettings | |||
| class ElasticsearchConfig(BaseSettings): | |||
| """ | |||
| Elasticsearch configs | |||
| Configuration settings for Elasticsearch | |||
| """ | |||
| ELASTICSEARCH_HOST: Optional[str] = Field( | |||
| description="Elasticsearch host", | |||
| description="Hostname or IP address of the Elasticsearch server (e.g., 'localhost' or '192.168.1.100')", | |||
| default="127.0.0.1", | |||
| ) | |||
| ELASTICSEARCH_PORT: PositiveInt = Field( | |||
| description="Elasticsearch port", | |||
| description="Port number on which the Elasticsearch server is listening (default is 9200)", | |||
| default=9200, | |||
| ) | |||
| ELASTICSEARCH_USERNAME: Optional[str] = Field( | |||
| description="Elasticsearch username", | |||
| description="Username for authenticating with Elasticsearch (default is 'elastic')", | |||
| default="elastic", | |||
| ) | |||
| ELASTICSEARCH_PASSWORD: Optional[str] = Field( | |||
| description="Elasticsearch password", | |||
| description="Password for authenticating with Elasticsearch (default is 'elastic')", | |||
| default="elastic", | |||
| ) | |||
| @@ -6,30 +6,30 @@ from pydantic_settings import BaseSettings | |||
| class MilvusConfig(BaseSettings): | |||
| """ | |||
| Milvus configs | |||
| Configuration settings for Milvus vector database | |||
| """ | |||
| MILVUS_URI: Optional[str] = Field( | |||
| description="Milvus uri", | |||
| description="URI for connecting to the Milvus server (e.g., 'http://localhost:19530' or 'https://milvus-instance.example.com:19530')", | |||
| default="http://127.0.0.1:19530", | |||
| ) | |||
| MILVUS_TOKEN: Optional[str] = Field( | |||
| description="Milvus token", | |||
| description="Authentication token for Milvus, if token-based authentication is enabled", | |||
| default=None, | |||
| ) | |||
| MILVUS_USER: Optional[str] = Field( | |||
| description="Milvus user", | |||
| description="Username for authenticating with Milvus, if username/password authentication is enabled", | |||
| default=None, | |||
| ) | |||
| MILVUS_PASSWORD: Optional[str] = Field( | |||
| description="Milvus password", | |||
| description="Password for authenticating with Milvus, if username/password authentication is enabled", | |||
| default=None, | |||
| ) | |||
| MILVUS_DATABASE: str = Field( | |||
| description="Milvus database, default to `default`", | |||
| description="Name of the Milvus database to connect to (default is 'default')", | |||
| default="default", | |||
| ) | |||
| @@ -3,35 +3,35 @@ from pydantic import BaseModel, Field, PositiveInt | |||
| class MyScaleConfig(BaseModel): | |||
| """ | |||
| MyScale configs | |||
| Configuration settings for MyScale vector database | |||
| """ | |||
| MYSCALE_HOST: str = Field( | |||
| description="MyScale host", | |||
| description="Hostname or IP address of the MyScale server (e.g., 'localhost' or 'myscale.example.com')", | |||
| default="localhost", | |||
| ) | |||
| MYSCALE_PORT: PositiveInt = Field( | |||
| description="MyScale port", | |||
| description="Port number on which the MyScale server is listening (default is 8123)", | |||
| default=8123, | |||
| ) | |||
| MYSCALE_USER: str = Field( | |||
| description="MyScale user", | |||
| description="Username for authenticating with MyScale (default is 'default')", | |||
| default="default", | |||
| ) | |||
| MYSCALE_PASSWORD: str = Field( | |||
| description="MyScale password", | |||
| description="Password for authenticating with MyScale (default is an empty string)", | |||
| default="", | |||
| ) | |||
| MYSCALE_DATABASE: str = Field( | |||
| description="MyScale database name", | |||
| description="Name of the MyScale database to connect to (default is 'default')", | |||
| default="default", | |||
| ) | |||
| MYSCALE_FTS_PARAMS: str = Field( | |||
| description="MyScale fts index parameters", | |||
| description="Additional parameters for MyScale Full Text Search index)", | |||
| default="", | |||
| ) | |||
| @@ -6,30 +6,30 @@ from pydantic_settings import BaseSettings | |||
| class OpenSearchConfig(BaseSettings): | |||
| """ | |||
| OpenSearch configs | |||
| Configuration settings for OpenSearch | |||
| """ | |||
| OPENSEARCH_HOST: Optional[str] = Field( | |||
| description="OpenSearch host", | |||
| description="Hostname or IP address of the OpenSearch server (e.g., 'localhost' or 'opensearch.example.com')", | |||
| default=None, | |||
| ) | |||
| OPENSEARCH_PORT: PositiveInt = Field( | |||
| description="OpenSearch port", | |||
| description="Port number on which the OpenSearch server is listening (default is 9200)", | |||
| default=9200, | |||
| ) | |||
| OPENSEARCH_USER: Optional[str] = Field( | |||
| description="OpenSearch user", | |||
| description="Username for authenticating with OpenSearch", | |||
| default=None, | |||
| ) | |||
| OPENSEARCH_PASSWORD: Optional[str] = Field( | |||
| description="OpenSearch password", | |||
| description="Password for authenticating with OpenSearch", | |||
| default=None, | |||
| ) | |||
| OPENSEARCH_SECURE: bool = Field( | |||
| description="whether to use SSL connection for OpenSearch", | |||
| description="Whether to use SSL/TLS encrypted connection for OpenSearch (True for HTTPS, False for HTTP)", | |||
| default=False, | |||
| ) | |||
| @@ -6,30 +6,30 @@ from pydantic_settings import BaseSettings | |||
| class OracleConfig(BaseSettings): | |||
| """ | |||
| ORACLE configs | |||
| Configuration settings for Oracle database | |||
| """ | |||
| ORACLE_HOST: Optional[str] = Field( | |||
| description="ORACLE host", | |||
| description="Hostname or IP address of the Oracle database server (e.g., 'localhost' or 'oracle.example.com')", | |||
| default=None, | |||
| ) | |||
| ORACLE_PORT: Optional[PositiveInt] = Field( | |||
| description="ORACLE port", | |||
| description="Port number on which the Oracle database server is listening (default is 1521)", | |||
| default=1521, | |||
| ) | |||
| ORACLE_USER: Optional[str] = Field( | |||
| description="ORACLE user", | |||
| description="Username for authenticating with the Oracle database", | |||
| default=None, | |||
| ) | |||
| ORACLE_PASSWORD: Optional[str] = Field( | |||
| description="ORACLE password", | |||
| description="Password for authenticating with the Oracle database", | |||
| default=None, | |||
| ) | |||
| ORACLE_DATABASE: Optional[str] = Field( | |||
| description="ORACLE database", | |||
| description="Name of the Oracle database or service to connect to (e.g., 'ORCL' or 'pdborcl')", | |||
| default=None, | |||
| ) | |||
| @@ -6,30 +6,30 @@ from pydantic_settings import BaseSettings | |||
| class PGVectorConfig(BaseSettings): | |||
| """ | |||
| PGVector configs | |||
| Configuration settings for PGVector (PostgreSQL with vector extension) | |||
| """ | |||
| PGVECTOR_HOST: Optional[str] = Field( | |||
| description="PGVector host", | |||
| description="Hostname or IP address of the PostgreSQL server with PGVector extension (e.g., 'localhost')", | |||
| default=None, | |||
| ) | |||
| PGVECTOR_PORT: Optional[PositiveInt] = Field( | |||
| description="PGVector port", | |||
| description="Port number on which the PostgreSQL server is listening (default is 5433)", | |||
| default=5433, | |||
| ) | |||
| PGVECTOR_USER: Optional[str] = Field( | |||
| description="PGVector user", | |||
| description="Username for authenticating with the PostgreSQL database", | |||
| default=None, | |||
| ) | |||
| PGVECTOR_PASSWORD: Optional[str] = Field( | |||
| description="PGVector password", | |||
| description="Password for authenticating with the PostgreSQL database", | |||
| default=None, | |||
| ) | |||
| PGVECTOR_DATABASE: Optional[str] = Field( | |||
| description="PGVector database", | |||
| description="Name of the PostgreSQL database to connect to", | |||
| default=None, | |||
| ) | |||
| @@ -6,30 +6,30 @@ from pydantic_settings import BaseSettings | |||
| class PGVectoRSConfig(BaseSettings): | |||
| """ | |||
| PGVectoRS configs | |||
| Configuration settings for PGVecto.RS (Rust-based vector extension for PostgreSQL) | |||
| """ | |||
| PGVECTO_RS_HOST: Optional[str] = Field( | |||
| description="PGVectoRS host", | |||
| description="Hostname or IP address of the PostgreSQL server with PGVecto.RS extension (e.g., 'localhost')", | |||
| default=None, | |||
| ) | |||
| PGVECTO_RS_PORT: Optional[PositiveInt] = Field( | |||
| description="PGVectoRS port", | |||
| description="Port number on which the PostgreSQL server with PGVecto.RS is listening (default is 5431)", | |||
| default=5431, | |||
| ) | |||
| PGVECTO_RS_USER: Optional[str] = Field( | |||
| description="PGVectoRS user", | |||
| description="Username for authenticating with the PostgreSQL database using PGVecto.RS", | |||
| default=None, | |||
| ) | |||
| PGVECTO_RS_PASSWORD: Optional[str] = Field( | |||
| description="PGVectoRS password", | |||
| description="Password for authenticating with the PostgreSQL database using PGVecto.RS", | |||
| default=None, | |||
| ) | |||
| PGVECTO_RS_DATABASE: Optional[str] = Field( | |||
| description="PGVectoRS database", | |||
| description="Name of the PostgreSQL database with PGVecto.RS extension to connect to", | |||
| default=None, | |||
| ) | |||
| @@ -6,30 +6,30 @@ from pydantic_settings import BaseSettings | |||
| class QdrantConfig(BaseSettings): | |||
| """ | |||
| Qdrant configs | |||
| Configuration settings for Qdrant vector database | |||
| """ | |||
| QDRANT_URL: Optional[str] = Field( | |||
| description="Qdrant url", | |||
| description="URL of the Qdrant server (e.g., 'http://localhost:6333' or 'https://qdrant.example.com')", | |||
| default=None, | |||
| ) | |||
| QDRANT_API_KEY: Optional[str] = Field( | |||
| description="Qdrant api key", | |||
| description="API key for authenticating with the Qdrant server", | |||
| default=None, | |||
| ) | |||
| QDRANT_CLIENT_TIMEOUT: NonNegativeInt = Field( | |||
| description="Qdrant client timeout in seconds", | |||
| description="Timeout in seconds for Qdrant client operations (default is 20 seconds)", | |||
| default=20, | |||
| ) | |||
| QDRANT_GRPC_ENABLED: bool = Field( | |||
| description="whether enable grpc support for Qdrant connection", | |||
| description="Whether to enable gRPC support for Qdrant connection (True for gRPC, False for HTTP)", | |||
| default=False, | |||
| ) | |||
| QDRANT_GRPC_PORT: PositiveInt = Field( | |||
| description="Qdrant grpc port", | |||
| description="Port number for gRPC connection to Qdrant server (default is 6334)", | |||
| default=6334, | |||
| ) | |||
| @@ -6,30 +6,30 @@ from pydantic_settings import BaseSettings | |||
| class RelytConfig(BaseSettings): | |||
| """ | |||
| Relyt configs | |||
| Configuration settings for Relyt database | |||
| """ | |||
| RELYT_HOST: Optional[str] = Field( | |||
| description="Relyt host", | |||
| description="Hostname or IP address of the Relyt server (e.g., 'localhost' or 'relyt.example.com')", | |||
| default=None, | |||
| ) | |||
| RELYT_PORT: PositiveInt = Field( | |||
| description="Relyt port", | |||
| description="Port number on which the Relyt server is listening (default is 9200)", | |||
| default=9200, | |||
| ) | |||
| RELYT_USER: Optional[str] = Field( | |||
| description="Relyt user", | |||
| description="Username for authenticating with the Relyt database", | |||
| default=None, | |||
| ) | |||
| RELYT_PASSWORD: Optional[str] = Field( | |||
| description="Relyt password", | |||
| description="Password for authenticating with the Relyt database", | |||
| default=None, | |||
| ) | |||
| RELYT_DATABASE: Optional[str] = Field( | |||
| description="Relyt database", | |||
| description="Name of the Relyt database to connect to (default is 'default')", | |||
| default="default", | |||
| ) | |||
| @@ -6,45 +6,45 @@ from pydantic_settings import BaseSettings | |||
| class TencentVectorDBConfig(BaseSettings): | |||
| """ | |||
| Tencent Vector configs | |||
| Configuration settings for Tencent Vector Database | |||
| """ | |||
| TENCENT_VECTOR_DB_URL: Optional[str] = Field( | |||
| description="Tencent Vector URL", | |||
| description="URL of the Tencent Vector Database service (e.g., 'https://vectordb.tencentcloudapi.com')", | |||
| default=None, | |||
| ) | |||
| TENCENT_VECTOR_DB_API_KEY: Optional[str] = Field( | |||
| description="Tencent Vector API key", | |||
| description="API key for authenticating with the Tencent Vector Database service", | |||
| default=None, | |||
| ) | |||
| TENCENT_VECTOR_DB_TIMEOUT: PositiveInt = Field( | |||
| description="Tencent Vector timeout in seconds", | |||
| description="Timeout in seconds for Tencent Vector Database operations (default is 30 seconds)", | |||
| default=30, | |||
| ) | |||
| TENCENT_VECTOR_DB_USERNAME: Optional[str] = Field( | |||
| description="Tencent Vector username", | |||
| description="Username for authenticating with the Tencent Vector Database (if required)", | |||
| default=None, | |||
| ) | |||
| TENCENT_VECTOR_DB_PASSWORD: Optional[str] = Field( | |||
| description="Tencent Vector password", | |||
| description="Password for authenticating with the Tencent Vector Database (if required)", | |||
| default=None, | |||
| ) | |||
| TENCENT_VECTOR_DB_SHARD: PositiveInt = Field( | |||
| description="Tencent Vector sharding number", | |||
| description="Number of shards for the Tencent Vector Database (default is 1)", | |||
| default=1, | |||
| ) | |||
| TENCENT_VECTOR_DB_REPLICAS: NonNegativeInt = Field( | |||
| description="Tencent Vector replicas", | |||
| description="Number of replicas for the Tencent Vector Database (default is 2)", | |||
| default=2, | |||
| ) | |||
| TENCENT_VECTOR_DB_DATABASE: Optional[str] = Field( | |||
| description="Tencent Vector Database", | |||
| description="Name of the specific Tencent Vector Database to connect to", | |||
| default=None, | |||
| ) | |||
| @@ -6,30 +6,30 @@ from pydantic_settings import BaseSettings | |||
| class TiDBVectorConfig(BaseSettings): | |||
| """ | |||
| TiDB Vector configs | |||
| Configuration settings for TiDB Vector database | |||
| """ | |||
| TIDB_VECTOR_HOST: Optional[str] = Field( | |||
| description="TiDB Vector host", | |||
| description="Hostname or IP address of the TiDB Vector server (e.g., 'localhost' or 'tidb.example.com')", | |||
| default=None, | |||
| ) | |||
| TIDB_VECTOR_PORT: Optional[PositiveInt] = Field( | |||
| description="TiDB Vector port", | |||
| description="Port number on which the TiDB Vector server is listening (default is 4000)", | |||
| default=4000, | |||
| ) | |||
| TIDB_VECTOR_USER: Optional[str] = Field( | |||
| description="TiDB Vector user", | |||
| description="Username for authenticating with the TiDB Vector database", | |||
| default=None, | |||
| ) | |||
| TIDB_VECTOR_PASSWORD: Optional[str] = Field( | |||
| description="TiDB Vector password", | |||
| description="Password for authenticating with the TiDB Vector database", | |||
| default=None, | |||
| ) | |||
| TIDB_VECTOR_DATABASE: Optional[str] = Field( | |||
| description="TiDB Vector database", | |||
| description="Name of the TiDB Vector database to connect to", | |||
| default=None, | |||
| ) | |||
| @@ -6,25 +6,25 @@ from pydantic_settings import BaseSettings | |||
| class WeaviateConfig(BaseSettings): | |||
| """ | |||
| Weaviate configs | |||
| Configuration settings for Weaviate vector database | |||
| """ | |||
| WEAVIATE_ENDPOINT: Optional[str] = Field( | |||
| description="Weaviate endpoint URL", | |||
| description="URL of the Weaviate server (e.g., 'http://localhost:8080' or 'https://weaviate.example.com')", | |||
| default=None, | |||
| ) | |||
| WEAVIATE_API_KEY: Optional[str] = Field( | |||
| description="Weaviate API key", | |||
| description="API key for authenticating with the Weaviate server", | |||
| default=None, | |||
| ) | |||
| WEAVIATE_GRPC_ENABLED: bool = Field( | |||
| description="whether to enable gRPC for Weaviate connection", | |||
| description="Whether to enable gRPC for Weaviate connection (True for gRPC, False for HTTP)", | |||
| default=True, | |||
| ) | |||
| WEAVIATE_BATCH_SIZE: PositiveInt = Field( | |||
| description="Weaviate batch size", | |||
| description="Number of objects to be processed in a single batch operation (default is 100)", | |||
| default=100, | |||
| ) | |||