MVP 0.92
This commit is contained in:
1 parent
60f0d2830d
commit
53b1eff833
62 files changed
+6578
-355
No files matched your search
@@ -290,6 +290,13 @@ def visible_for_role(payload: dict, role: str | None) -> dict:
|
||||
cleaned = dict(payload)
|
||||
cleaned.pop("trace", None)
|
||||
cleaned.pop("decision", None)
|
||||
opening = cleaned.get("opening")
|
||||
if isinstance(opening, dict):
|
||||
opening = dict(opening)
|
||||
opening.pop("trace", None)
|
||||
opening.pop("decision", None)
|
||||
opening.pop("opening_context", None)
|
||||
cleaned["opening"] = opening
|
||||
return cleaned
|
||||
|
||||
|
||||
@@ -339,8 +346,16 @@ def run_turn(profile_id: str, conversation_id: str, body: str, message_id: str |
|
||||
"parsed": parsed_ok,
|
||||
"guard": "local_fallback",
|
||||
}
|
||||
except EngineError:
|
||||
raise
|
||||
except EngineError as exc:
|
||||
if exc.code != "response_validation_failed":
|
||||
raise
|
||||
impulse = local_hold(last_user_text(assembled))
|
||||
decision = {
|
||||
"operation": "fortfuehren",
|
||||
"label": OPERATIONS["fortfuehren"],
|
||||
"parsed": False,
|
||||
"guard": "identity_leak_blocked",
|
||||
}
|
||||
assistant = append_message(profile_id, conversation_id, impulse, role="assistant")
|
||||
user_bodies = [
|
||||
item.get("body") or ""
|
||||
|
||||
Reference in new issue
Block a user