Omkar008 commited on
Commit
73f1c56
1 Parent(s): 2f625a1

Update services/utils.py

Browse files
Files changed (1) hide show
  1. services/utils.py +2 -2
services/utils.py CHANGED
@@ -22,11 +22,11 @@ api_key=os.getenv('OPENAI_API_KEY')
22
 
23
  class Candidate(BaseModel):
24
  brand: str = Field(description="Please provide the name of the brand from which the receipt is. If there are multiple brand names present, please specify the most prominent or relevant brand associated with the receipt. If the brand name is not explicitly stated, provide any context or details that might help identify it accurately. If the information is not present or unclear, strictly mark the value as null.")
25
- total_cost: str = Field(description="Fetch Total order value of the receipt.you can specify the total order value section on the receipt, such as ‘Total’ or ‘Total Amount’. Additionally, mention any common variations in labeling that might indicate the total order value, such as ‘Grand Total’,’Total Amount’.If you cannot find total order value then default value null.")
26
  location: str = Field(description="Please provide the city and state where the purchase was made. If the receipt is related to travel, extract the location from where the booking was made, not the destination. Look for details such as the booking origin or departure city/state. If the purchase location is not explicitly stated, provide any relevant clues or context from the receipt to help identify it accurately. If the information is not present or unclear, mark the value as null.For travel receipts, consider extracting details such as the departure airport code, departure city, or booking location mentioned in the itinerary or booking confirmation section. This location typically indicates where the purchase was initiated.")
27
  no_of_items: str = Field(description="Number of items in the order.If the information is not present mark the value as null.")
28
  purchase_category: str = Field(description="The purchase category among fashion, home, travel, food, groceries, hotels, spa, insurance and others.If the information is not present mark the value as null.")
29
- Date: str = Field(description="Date of purchase.If the information is not present mark the value as null. Make sure the date format is in dd-MM-yyyy.")
30
 
31
 
32
  # async def initialize_openai():
 
22
 
23
  class Candidate(BaseModel):
24
  brand: str = Field(description="Please provide the name of the brand from which the receipt is. If there are multiple brand names present, please specify the most prominent or relevant brand associated with the receipt. If the brand name is not explicitly stated, provide any context or details that might help identify it accurately. If the information is not present or unclear, strictly mark the value as null.")
25
+ total_cost: str = Field(description="Fetch Total order value of the receipt.you can specify the total order value section on the receipt, such as ‘Total’ or ‘Total Amount’. Additionally, mention any common variations in labeling that might indicate the total order value, such as ‘Grand Total’,’Total Amount’.If you cannot find total order value then mark value as null.")
26
  location: str = Field(description="Please provide the city and state where the purchase was made. If the receipt is related to travel, extract the location from where the booking was made, not the destination. Look for details such as the booking origin or departure city/state. If the purchase location is not explicitly stated, provide any relevant clues or context from the receipt to help identify it accurately. If the information is not present or unclear, mark the value as null.For travel receipts, consider extracting details such as the departure airport code, departure city, or booking location mentioned in the itinerary or booking confirmation section. This location typically indicates where the purchase was initiated.")
27
  no_of_items: str = Field(description="Number of items in the order.If the information is not present mark the value as null.")
28
  purchase_category: str = Field(description="The purchase category among fashion, home, travel, food, groceries, hotels, spa, insurance and others.If the information is not present mark the value as null.")
29
+ Date: str = Field(description="Date of purchase. Make sure the date format is in dd-MM-yyyy.If the information is not present mark the value as null.")
30
 
31
 
32
  # async def initialize_openai():