fix(projekt-matching): nice-heading exception in extract prompt; lock enable_thinking in tests
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -94,9 +94,10 @@ vor Signalwörtern; "idealerweise" INNERHALB einer Must-Zeile lässt die \
|
||||
Zeile Must bleiben. Nice-Signalwörter gelten NUR für die Zeile, in der \
|
||||
sie selbst stehen — sie färben NIE auf folgende Zeilen ab: Jede Zeile \
|
||||
eines Anforderungs-Abschnitts OHNE eigenes Nice-Signalwort ist Must, \
|
||||
auch wenn direkt davor Nice-Zeilen stehen. Beispiel: Auf "Idealerweise \
|
||||
zusätzlich Erfahrung mit X" (Nice) folgt "Erfahrung mit Y" ohne \
|
||||
Signalwort → Y ist Must.
|
||||
auch wenn direkt davor Nice-Zeilen stehen — AUSNAHME: Zeilen unter einer \
|
||||
expliziten Nice-to-haves-Überschrift bleiben Nice. Beispiel: Auf \
|
||||
"Idealerweise zusätzlich Erfahrung mit X" (Nice) folgt "Erfahrung mit Y" \
|
||||
ohne Signalwort → Y ist Must.
|
||||
- miscType nur für Misc-Zeilen relevant (sonst "other"): start = \
|
||||
Projektstart/Verfügbarkeit (startDate als ISO-Datum YYYY-MM-DD, wenn ein \
|
||||
konkretes Datum genannt ist, sonst null); workload = Auslastung \
|
||||
@@ -146,6 +147,8 @@ def _post(base, model, messages, schema):
|
||||
|
||||
|
||||
def chat_json(base, model, messages, schema, attempts=3):
|
||||
if attempts < 1:
|
||||
raise ValueError("attempts must be >= 1")
|
||||
last = None
|
||||
for attempt in range(attempts):
|
||||
resp = _post(base, model, messages, schema)
|
||||
|
||||
@@ -25,6 +25,7 @@ def test_chat_json_strips_think_and_parses():
|
||||
assert out == {"a": 1}
|
||||
body = p.call_args.kwargs["json"]
|
||||
assert "max_tokens" not in body
|
||||
assert body["chat_template_kwargs"] == {"enable_thinking": False}
|
||||
assert body["response_format"]["json_schema"]["schema"] == {"type": "object"}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user