qq1023's picture
Update categories/travel_flight/model.py
50b87bc
raw
history blame
1.91 kB
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"),
ResponseSchema(name="Billing Date", description="The date the invoice was issued"),
ResponseSchema(name="Summary", description = "5-6 words short summary of purchased good(s)"),
))
]"""
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")
uids: str = Field(..., title="PNR Number of flight")
total: float = Field(..., title="cost of flight ticket")
issue_date: date = Field(..., title="The date the invoice was issued")
summary: str = Field(..., title="5-6 words short summary of purchased good(s)")