Files
ai-contract-platform/backend/app/core/config.py
T
2026-05-03 19:09:26 +08:00

32 lines
1.2 KiB
Python

from pathlib import Path
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
app_name: str = "AI Contract Platform"
app_env: str = "development"
api_v1_prefix: str = "/api/v1"
shared_ai_platform_base_url: str = ""
shared_ai_platform_api_prefix: str = "/api/v0.1"
shared_ai_platform_app_id: str = "ai-contract-platform"
shared_ai_platform_api_key: str = ""
shared_ai_platform_timeout_seconds: float = 30.0
shared_ai_platform_legal_review_enabled: bool = False
shared_ai_platform_legal_review_fallback_to_local: bool = True
secret_key: str = "change-me"
access_token_expire_minutes: int = 120
database_url: str = "postgresql+psycopg://postgres:postgres@localhost:5432/ai_contract_platform"
redis_url: str = "redis://localhost:6379/0"
minio_endpoint: str = "localhost:9000"
minio_access_key: str = "minioadmin"
minio_secret_key: str = "minioadmin"
minio_bucket: str = "contracts"
minio_secure: bool = False
local_storage_dir: str = str(Path(__file__).resolve().parents[2] / "storage")
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
settings = Settings()