From 7ab089661dc0c20a224999bcb6285312e299ee9e Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 13 Aug 2025 18:57:07 -0600 Subject: [PATCH] Write response for debug --- frigate/genai/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frigate/genai/__init__.py b/frigate/genai/__init__.py index 47a5a2426..111ad33af 100644 --- a/frigate/genai/__init__.py +++ b/frigate/genai/__init__.py @@ -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)