feat: add resource library and real image workflow
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
"""Application settings."""
|
||||
|
||||
from functools import lru_cache
|
||||
from pathlib import Path
|
||||
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
PROJECT_ROOT = Path(__file__).resolve().parents[2]
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Runtime settings loaded from environment variables."""
|
||||
@@ -15,11 +18,25 @@ class Settings(BaseSettings):
|
||||
database_url: str = "sqlite+aiosqlite:///./temporal_demo.db"
|
||||
temporal_address: str = "localhost:7233"
|
||||
temporal_namespace: str = "default"
|
||||
s3_access_key: str = ""
|
||||
s3_secret_key: str = ""
|
||||
s3_bucket: str = ""
|
||||
s3_region: str = ""
|
||||
s3_endpoint: str = ""
|
||||
s3_cname: str = ""
|
||||
s3_presign_expiry_seconds: int = 900
|
||||
image_generation_provider: str = "mock"
|
||||
gemini_api_key: str = ""
|
||||
gemini_base_url: str = "https://api.museidea.com/v1beta"
|
||||
gemini_model: str = "gemini-3.1-flash-image-preview"
|
||||
gemini_timeout_seconds: int = 300
|
||||
gemini_max_attempts: int = 2
|
||||
|
||||
model_config = SettingsConfigDict(
|
||||
env_file=".env",
|
||||
env_file=PROJECT_ROOT / ".env",
|
||||
env_file_encoding="utf-8",
|
||||
case_sensitive=False,
|
||||
extra="ignore",
|
||||
)
|
||||
|
||||
@property
|
||||
@@ -34,4 +51,3 @@ def get_settings() -> Settings:
|
||||
"""Return the cached application settings."""
|
||||
|
||||
return Settings()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user