krishnavadithya's picture
Upload 6 files
cff37c5 verified
raw
history blame contribute delete
864 Bytes
from typing import List
from pydantic import BaseModel, Field
class InvoiceItem(BaseModel):
material: str = Field(description="The main product item in the row for which the details are being extracted.")
Packing: str = Field(description="The packing size of the product. This is usually the quantity present in one product")
quantity: str = Field(description="The number of products mentioned in the invoice")
class Invoice(BaseModel):
po_date: str = Field(description="PO Date is usually the date on which the order was processed.")
order_value: float = Field(description="The total order value present at the end of the invoice product details.")
company_name: str = Field(description="The company sending in the invoice details.")
items: List[InvoiceItem] = Field(description="List of all Invoice Items present in the document.")