Fix error ?
Build, push image, and notify Watchtower / build-image (push) Successful in 33s
Build, push image, and notify Watchtower / notify (push) Successful in 9s

This commit is contained in:
2026-08-10 16:58:29 +02:00
parent 40e91a7d2b
commit 38e10d33e1
+6
View File
@@ -35,8 +35,14 @@ def check_dish_safety(image_path: str) -> dict:
images=[image_path], images=[image_path],
output_format=DISH_SAFETY_SCHEMA # Passed as Ollama's `format` parameter output_format=DISH_SAFETY_SCHEMA # Passed as Ollama's `format` parameter
) )
print(f"[Debug] Raw response from AI generator: {response_raw}")
# 1. If response_raw is already a dict, return it directly
if isinstance(response_raw, dict): if isinstance(response_raw, dict):
return response_raw return response_raw
# 2. If it's a string or bytes, parse it
if isinstance(response_raw, (str, bytes, bytearray)):
return json.loads(response_raw) return json.loads(response_raw)
raise ValueError(f"Unexpected response type from AI generator: {type(response_raw)}")