mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-27 17:17:40 +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)
|
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:
|
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