Fix default model, increase timeout, improve multi-column prompt

- Change default text-LLM from llama3 (not installed) to gemma3:12b
- Increase LLM timeout from 120s to 300s (large models need longer)
- Add explicit multi-column layout instruction to vision prompt to
  prevent skipping columns on dense CD back-cover tracklists

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Dieter Schlüter 2026-02-17 22:56:02 +01:00
commit b599c9eb8a
3 changed files with 7 additions and 4 deletions

View file

@ -90,7 +90,7 @@ def scan(
),
languages: str = typer.Option("deu+eng", "--lang", "-l", help="OCR-Sprachen"),
backend: str = typer.Option("ollama", "--backend", "-b", help="LLM-Backend"),
model: str = typer.Option("llama3", "--model", "-m", help="Text-LLM-Modell"),
model: str = typer.Option("gemma3:12b", "--model", "-m", help="Text-LLM-Modell"),
base_url: str = typer.Option(
"http://localhost:11434", "--url", help="LLM-API-URL"
),
@ -262,7 +262,7 @@ def process(
),
languages: str = typer.Option("deu+eng", "--lang", "-l"),
backend: str = typer.Option("ollama", "--backend", "-b"),
model: str = typer.Option("llama3", "--model", "-m"),
model: str = typer.Option("gemma3:12b", "--model", "-m"),
base_url: str = typer.Option("http://localhost:11434", "--url"),
dry_run: bool = typer.Option(False, "--dry-run"),
) -> None:

View file

@ -47,7 +47,7 @@ def _call_ollama(text: str, model: str, base_url: str) -> str:
],
"stream": False,
},
timeout=120.0,
timeout=300.0,
)
response.raise_for_status()
return response.json()["message"]["content"]
@ -71,7 +71,7 @@ def _call_openai_compatible(
{"role": "user", "content": text},
],
},
timeout=120.0,
timeout=300.0,
)
response.raise_for_status()
return response.json()["choices"][0]["message"]["content"]

View file

@ -28,6 +28,9 @@ WICHTIG:
- Wenn "CD 1", "CD 2", "Disc 1" etc. sichtbar sind, erstelle mehrere Einträge in "discs".
- Ohne Disc-Angabe: eine Disc mit disc_number=1.
- Lasse Zeitangaben (z.B. "3:12") und Interpretenangaben pro Track weg.
- MEHRSPALTIGE LAYOUTS: CD-Rückseiten haben oft 2, 3 oder 4 Spalten nebeneinander.
Lies ALLE Spalten vollständig von oben nach unten, bevor du zur nächsten Spalte gehst.
Überspringen oder Auslassen von Spalten ist ein häufiger Fehler lies jede Spalte komplett.
Antworte NUR mit dem JSON, ohne Erklärung. Beispiel: