v1.0.112: fix Lucee UPPERCASE keys in _fetch_prompt (OK→ok, BODY→body)

This commit is contained in:
2026-06-23 07:05:29 +04:00
parent 38f580e658
commit 534f90a529
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -80,6 +80,8 @@ def _fetch_prompt(role: str) -> dict | None:
)
resp.raise_for_status()
data = resp.json()
# Lucee serializeJSON → UPPERCASE keys, normalize to lowercase
data = {k.lower(): v for k, v in data.items()}
if data.get("ok") and data.get("body"):
return {"id": data.get("id", ""), "body": data["body"]}
except Exception: