Thank you for your response.
Currently, I have some text containing information. I need to extract additional details in JSON format from this text, as specified below. If I have similar text every month, totaling one lakh instances, can you please provide an estimate of the cost? My management team needs this information to budget accordingly. Could you please explain the pricing based on the text I’ve provided?
I have also included the API response and request for your reference.
Command Input →
input_text = “I want to statically extract the Invoice Number, Date of Expenses (in the format DD-MM-YYYY), Amount, Currency(check in response if any symbal is coming return as String currency name), Merchant Name, Category, Tax Amount, and Tax Percentage keys from this text. Could you provide them in JSON format? The JSON object format is as follows: {‘Invoice Number’:‘String’, ‘Date of Expenses’:‘String’, ‘Amount’:‘Double’, ‘Currency’:‘String’, ‘Merchant Name’:‘String’, ‘Category’:‘String’, ‘Tax Amount’:‘Double’, ‘Tax Percentage’:‘Double’}.”
response = openai.ChatCompletion.create(
model=“gpt-3.5-turbo-0125”,
messages=[
{“role”: “user”, “content”: input_text},
{“role”: “system”, “content”: extracted_text}
]
)
============================================================
Extracted text: extracted_text which i have sent in api parameter
Prabhakaran C
NA
Mini - Silver Indigo
Ride Details
03:42 PM
TAFE, Nungambakkam High
Road Ponnangipuram
Tirumurthy Nagar
Nungambakkam Chennai
Tamil Nadu India
03:50 PM
VDS House, 41, Cathedral
Rd, Ellaiamman Colony,
Teynampet, Chennai
Your Trip
₹129.12
Total Bill (rounded off)
Includes ₹9.12 Taxes
₹129
Have queries? Visit support for this ride.
We’ve fulfilled our promise to take you to
destination for pre-agreed Total Fare. Modifying
the drop/route can change this fare.
Bill Details
Paid by OlaMoney Postpaid
₹129
29 Apr, 2022
₹129
CRN6215232412
Thanks for travelling with us, Benny Robertson
Payment
Original Tax Invoice
Driver Trip Invoice
Prabhakaran C NA
Ola Mini - Silver Indigo
TN11S3675
Operator State/UT: Tamil
Nadu
Service Tax Category: Renting of motor
cab
SAC Code: 996412
Invoice ID DIOTGKWFO313168
Invoice Date 29/04/2022
Customer Name Benny Robertson
Mobile Number +919940033732
Pickup Address TAFE, Nungambakkam High Road
Ponnangipuram Tirumurthy Nagar Nungambakkam
Chennai Tamil Nadu India
Description
Amount (INR)
Customer Ride Number - CRN6215232412
Ride Fee
₹96
CGST
2.5%
₹2.4
SGST
2.5%
₹2.4
Subtotal
₹100.8
Total
Customer Ride
Fare
₹100.8
Please note: 1. This invoice is issued on behalf of Transport Service Provider. ANI Technologies Private Limited acts in the capacity of an Electronic
Commerce Operator as per Section 9(5) of the Central Goods & Service Tax Act, 2017 & corresponding Section 5(5) of the State GST laws. 2. This is an
electronically generated invoice and does not require a digital signature.
Original Tax Invoice
ANI Technologies Pvt. Ltd.
ANI Technologies Pvt.Ltd, 18-A, SIDCO
Industrial Area, MMDA Bus Terminal,
Arumbakkam,Chennai
State GSTIN: 33AAJCA1389G1ZQ
SAC Code: 999799
Service Tax Category: Business Auxiliary
Service
Invoice ID CIOTGKWFO313168
Invoice Date 29/04/2022
Customer Name Benny Robertson
Mobile Number +919940033732
Supply Address ANI Technologies Pvt.Ltd, 18-A, SIDCO
Industrial Area, MMDA Bus Terminal,
Arumbakkam,Chennai
Description
Amount (INR)
Ola Convenience Fee - CRN6215232412
Convenience Fee (Ride)
₹24
CGST
9.0%
₹2.16
SGST
9.0%
₹2.16
Total
Convenience Fee
Fare
₹28.32
Payment Details
Paid by
OlaMoney Postpaid
Transaction date
29 Apr, 2022 03:50 PM
Amount
₹28.32
Reference Id
6800184a-a7a8-42f2-bccb-46d0433dffe2
Please note:
- This is an electronically generated invoice and does not require a digital signature.
- Vide Circular No. 146/02/2021- GST dated 23rd February 2021, Printing of Dynamic QR code is not mandatory in case of Prepaid invoice since cross
reference of payment is available.
==============================================================
Additional keys extracted from the text using OpenAI’s GPT-3.5-turbo model:
{
“Invoice Number”: “DIOTGKWFO313168”,
“Date of Expenses”: “29-04-2022”,
“Amount”: 100.8,
“Currency”: “INR”,
“Merchant Name”: “ANI Technologies Pvt. Ltd.”,
“Category”: “Transportation Service”,
“Tax Amount”: 4.8,
“Tax Percentage”: 5.0
}