from pydantic_settings import BaseSettings


class Settings(BaseSettings):
    # GPU서버 Ollama (텍스트 생성)
    OLLAMA_BASE_URL: str = "http://192.168.1.186:11434"
    OLLAMA_TEXT_MODEL: str = "qwen3.5:9b-q8_0"
    OLLAMA_TIMEOUT: int = 120

    # 맥미니 Ollama (임베딩) — OrbStack: host.internal / Docker Desktop: host.docker.internal
    OLLAMA_EMBED_URL: str = "http://host.internal:11434"
    OLLAMA_EMBED_MODEL: str = "bge-m3"

    # 맥미니 Qdrant (기존 인스턴스, 회사 전용 컬렉션)
    QDRANT_URL: str = "http://host.internal:6333"
    QDRANT_COLLECTION: str = "tk_qc_issues"

    # ds923 MariaDB (Tailscale)
    DB_HOST: str = "100.71.132.52"
    DB_PORT: int = 30306
    DB_USER: str = "hyungi_user"
    DB_PASSWORD: str = ""
    DB_NAME: str = "hyungi"

    SECRET_KEY: str = ""
    ALGORITHM: str = "HS256"

    # ds923 System1 API (Tailscale)
    SYSTEM1_API_URL: str = "http://100.71.132.52:30005"
    METADATA_DB_PATH: str = "/app/data/metadata.db"

    class Config:
        env_file = ".env"


settings = Settings()
