Add caption and hybrid search configuration

This commit is contained in:
Sleeps
2026-10-06 13:58:47 +01:00
parent 7ec99eaf26
commit 2515fba3c7
+11 -1
View File
@@ -14,11 +14,21 @@ class Settings:
meili_url: str = os.getenv("MEILI_URL", "http://127.0.0.1:7700").rstrip("/")
meili_master_key: str = os.getenv("MEILI_MASTER_KEY", "change-me-now")
meili_index: str = os.getenv("MEILI_INDEX", "jellyfin_scenes")
hybrid_semantic_ratio: float = float(os.getenv("HYBRID_SEMANTIC_RATIO", "0.80"))
model_id: str = os.getenv("MODEL_ID", "google/siglip2-base-patch16-224")
device: str = os.getenv("DEVICE", "cuda")
data_dir: Path = Path(os.getenv("DATA_DIR", "./data")).resolve()
batch_size: int = int(os.getenv("BATCH_SIZE", "8"))
ollama_url: str = os.getenv("OLLAMA_URL", "http://127.0.0.1:11434").rstrip("/")
caption_model: str = os.getenv(
"CAPTION_MODEL",
"huihui_ai/qwen3-vl-abliterated:4b-instruct-q4_K_M",
)
caption_timeout_seconds: int = int(os.getenv("CAPTION_TIMEOUT_SECONDS", "180"))
data_dir: Path = Path(os.getenv("DATA_DIR", "./data")).resolve()
@property
def db_path(self) -> Path:
return self.data_dir / "scenes.sqlite3"