mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-09-05 17:51:36 +02:00
Write response for debug
This commit is contained in:
parent
99cada829b
commit
7ab089661d
@ -129,6 +129,15 @@ Threat-level definitions:
|
|||||||
|
|
||||||
response = self._send(context_prompt, thumbnails)
|
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:
|
if response:
|
||||||
clean_json = re.sub(
|
clean_json = re.sub(
|
||||||
r"\n?```$", "", re.sub(r"^```[a-zA-Z0-9]*\n?", "", response)
|
r"\n?```$", "", re.sub(r"^```[a-zA-Z0-9]*\n?", "", response)
|
||||||
|
Loading…
Reference in New Issue
Block a user