From 2572c68ac7ad80d2c389fc574426b35c1934a124 Mon Sep 17 00:00:00 2001 From: Matthias Guillitte Date: Tue, 11 Aug 2026 14:38:35 +0200 Subject: [PATCH] Modified prompt --- cloud/safety_checker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cloud/safety_checker.py b/cloud/safety_checker.py index 0b9103b..961cebe 100644 --- a/cloud/safety_checker.py +++ b/cloud/safety_checker.py @@ -6,10 +6,10 @@ from APIs.aichat import generate # 1. Define the output schema as a Pydantic model class DishSafetyResult(BaseModel): is_safe: bool = Field( - description="True if no microwave hazards (metal, foil, sealed packaging) are present." + description="True if no microwave hazards (metal, foil, sealed packaging, ...) are present." ) warning_message: str = Field( - description="Explanation of any hazard found, or an empty string if safe." + description="Short explanation of any hazard found (no more than one sentence), or an empty string if safe." ) detected_hazards: list[str] = Field( description="List of specific hazard items detected." @@ -19,7 +19,7 @@ class DishSafetyResult(BaseModel): def check_dish_safety(image_path: str) -> dict: prompt = ( "Analyze this top-down photo of a dish prepared for microwave cooking. " - "Inspect the area for metal utensils, aluminum foil, metallic dish patterns, or unvented plastic wraps." + "Inspect the area for metal utensils, aluminum foil, metallic dish patterns, or unvented plastic wraps that could be dangerous for the cooking process or pose a safety risk." ) # 2. Pass the Pydantic class directly to generate()