Spaces:
Sleeping
Sleeping
from __future__ import annotations | |
from datetime import date, time | |
from pydantic import BaseModel, Field | |
class InformationExtractedFromABillReceipt(BaseModel): | |
""" | |
response_schemas = [ | |
ResponseSchema(name="place (from)", description="place where flight starts/takes-off"), | |
ResponseSchema(name="date (from)", description="date on which flight starts/takes-off (DD/MM/YYYY)"), | |
ResponseSchema(name="time (from)", description="time at which flight starts/takes-off"), | |
ResponseSchema(name="place (to)", description="place where flight end/lands"), | |
ResponseSchema(name="date (to)", description="date on which flight end/lands (DD/MM/YYYY)"), | |
ResponseSchema(name="time (to)", description="time at which flight end/lands"), | |
ResponseSchema(name="PNR Number", description ="PNR Number of flight"), | |
ResponseSchema(name="amount", description="cost of flight ticket") | |
]""" | |
place_from: str = Field(..., title="place where flight starts/takes-off") | |
date_from: date = Field( | |
..., title="date on which flight starts/takes-off (DD/MM/YYYY)" | |
) | |
time_from: time = Field(..., title="time at which flight starts/takes-off") | |
place_to: str = Field(..., title="place where flight end/lands") | |
date_to: date = Field(..., title="date on which flight end/lands (DD/MM/YYYY)") | |
time_to: time = Field(..., title="time at which flight end/lands") | |
pnr_number: str = Field(..., title="PNR Number of flight") | |
amount: float = Field(..., title="cost of flight ticket") | |