File size: 1,555 Bytes
0d99179
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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")