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)