Better prompt

This commit is contained in:
2026-08-11 18:16:58 +02:00
parent 07051a7255
commit bfc6a75e66
+3 -2
View File
@@ -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."
)