mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-27 09:07:41 +03:00
Debug save response
This commit is contained in:
parent
9db1ccb3f9
commit
dfcad959c5
@ -115,6 +115,15 @@ Sequence details:
|
||||
|
||||
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(response)
|
||||
|
||||
if response:
|
||||
clean_json = re.sub(
|
||||
r"\n?```$", "", re.sub(r"^```[a-zA-Z0-9]*\n?", "", response)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user