File size: 1,031 Bytes
2edb151 676f5d4 2edb151 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | from __future__ import annotations
import io
from pathlib import Path
import pytest
from PIL import Image
from app.config import Settings, load_settings
def tiny_jpeg() -> bytes:
image = Image.new("RGB", (16, 16), (240, 240, 240))
buf = io.BytesIO()
image.save(buf, format="JPEG")
return buf.getvalue()
@pytest.fixture
def settings(tmp_path: Path) -> Settings:
return load_settings(
root_dir=tmp_path,
data_dir=tmp_path / "data",
inbox_dir=tmp_path / "inbox",
processing_dir=tmp_path / "processing",
processed_dir=tmp_path / "processed",
failed_dir=tmp_path / "failed",
exports_dir=tmp_path / "exports",
idle_seconds=0.05,
llm_backend="gemma",
llm_route="direct",
llm_base_url="http://llm.test/v1",
llm_model="google/gemma-4-12B-it",
embed_backend="omni",
embed_base_url="http://llm.test/v1",
embed_model="google/gemma-4-12B-it",
embed_dim=8,
embed_prefix=True,
)
|