Write response for debug

This commit is contained in:
Nicolas Mowen 2025-08-13 18:57:07 -06:00
parent 99cada829b
commit 7ab089661d

View File

@ -129,6 +129,15 @@ Threat-level definitions:
response = self._send(context_prompt, thumbnails)
if debug_save:
with open(
os.path.join(
CLIPS_DIR, "genai-requests", review_data["id"], "response.txt"
),
"w",
) as f:
f.write(context_prompt)
if response:
clean_json = re.sub(
r"\n?```$", "", re.sub(r"^```[a-zA-Z0-9]*\n?", "", response)