diff --git a/cloud/safety_checker.py b/cloud/safety_checker.py index d0d8776..b076278 100644 --- a/cloud/safety_checker.py +++ b/cloud/safety_checker.py @@ -1,6 +1,7 @@ import json from pydantic import BaseModel, Field from APIs.aichat import generate +import shared.config as config # 1. Define the output schema as a Pydantic model @@ -9,10 +10,10 @@ class DishSafetyResult(BaseModel): description="True if no microwave hazards presents." ) warning_message: str = Field( - description="Short explanation of any hazard found (no more than 50 characters), or an empty string if safe." + description=f"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." + description="List of specific hazard items detected. Only include items that are actually present in the image. If no hazards are detected, this list should be empty." )