Owadokun Tosin Tobi commited on
Commit
90c670b
·
unverified ·
1 Parent(s): b36dc38

Create models.py

Browse files
Files changed (1) hide show
  1. agents/models.py +24 -0
agents/models.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pydantic import BaseModel, Field
2
+ from typing import List, Optional
3
+
4
+ # Schema 1: Invoice Extraction
5
+ class InvoiceSchema(BaseModel):
6
+ vendor: str = Field(description="Name of the company or service provider")
7
+ total_amount: float = Field(description="Total cost extracted")
8
+ currency: str = Field(description="Currency code (USD, EUR, NGN)", default="USD")
9
+ date: str = Field(description="Date of transaction (YYYY-MM-DD) or 'Unknown'")
10
+ items: List[str] = Field(description="List of line items purchased", default_factory=list)
11
+ is_paid: bool = Field(description="True if payment is confirmed")
12
+
13
+ # Schema 2: Resume Parsing
14
+ class ResumeSchema(BaseModel):
15
+ name: str = Field(description="Candidate's full name")
16
+ email: Optional[str] = Field(description="Email address")
17
+ skills: List[str] = Field(description="Technical skills found")
18
+ years_experience: int = Field(description="Estimated years of experience", default=0)
19
+ summary: str = Field(description="Brief professional summary")
20
+
21
+ # Schema 3: Generic Data
22
+ class GenericSchema(BaseModel):
23
+ key_points: List[str] = Field(description="Main takeaways")
24
+ sentiment: str = Field(description="Positive, Neutral, or Negative")