Omkar008 commited on
Commit
21c8bfc
1 Parent(s): d51772c

Update services/utils.py

Browse files
Files changed (1) hide show
  1. services/utils.py +0 -16
services/utils.py CHANGED
@@ -29,22 +29,6 @@ from tenacity import (
29
  api_key=os.getenv('OPENAI_API_KEY')
30
 
31
 
32
- # class Candidate(BaseModel):
33
- # brand: Optional[str] = Field(default=None, description="Please identify and provide the primary brand name listed on the receipt. If multiple brand names are present, determine and specify the most prominent or relevant brand associated with the primary transaction on the receipt. If the brand name is not explicitly mentioned, include any contextual details or indirect indicators that might help in accurately identifying the brand.")
34
- # total_cost: Optional[str] = Field(default=None, description="Identify and provide the 'Total Order Value' listed on the receipt. Please specify the exact section where this value is noted, typically labeled as 'Total', 'Total Amount','total' , 'total amount' ,'total cost','Total Cost','Grand total','grand total'. Include any other labeling variations that might represent the total order value. If the total order value is not present or cannot be determined, explicitly state 'null' as the response.")
35
- # location: Optional[str] = Field(default=None, description="Please provide the city and state where the purchase was made, as indicated on the receipt. For travel-related receipts, extract the location from which the booking was initiated, focusing on the booking origin or departure city/state, rather than the destination. Look for specific details such as the departure airport code, departure city, or the booking location mentioned in the itinerary or booking confirmation section. If no such information is available, or if it remains unclear, clearly mark the response as 'null'")
36
- # no_of_items: Optional[str] = Field(default=None, description="Specify the total number of items listed in the order as reflected in the receipt or document. If the total count of items is not explicitly mentioned or if it cannot be determined from the provided document, please assign and return the value 'null'.")
37
- # purchase_category: Optional[str] = Field(default=None, description="Identify and specify the purchase category. Choose from the following predefined categories: fashion, home, travel, food, groceries, hotels, spa, insurance, or others. If the purchase category is not explicitly stated on the receipt or document, or if it cannot be accurately determined based on the available information, assign and return the value 'null'.")
38
- # brand_category: Optional[str] = Field(default=None, description="""Based on the receipt information, use one of the following brand categories strictly:
39
- # 1. "Fashion, Dress, Personal"
40
- # 2. "Coffee - Personal"
41
- # 3. "Food - Personal"
42
- # 4. "Travel, Roam, Explore"
43
- # 5. "Shopping, Hunt, Obtain"
44
- # If you don't find any brand category then return 'null'.
45
- # """)
46
- # Date: Optional[str] = Field(default=None, description="Specify the date of purchase in the format dd-MM-yyyy. If the date of purchase is not explicitly provided on the receipt or document, or if it cannot be accurately determined, assign the value 'null'. Ensure the date is formatted correctly as day, month, and year in two digits each.")
47
-
48
 
49
  class Candidate(BaseModel):
50
  brand: Optional[str] = Field(default=None, description="INSERT BRAND NAME FROM THE RECEIPT OCR TEXT. IF NOT PRESENT RETURN null")
 
29
  api_key=os.getenv('OPENAI_API_KEY')
30
 
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
  class Candidate(BaseModel):
34
  brand: Optional[str] = Field(default=None, description="INSERT BRAND NAME FROM THE RECEIPT OCR TEXT. IF NOT PRESENT RETURN null")