From c546235677ac369c47ee10643239087bf6b604ed Mon Sep 17 00:00:00 2001 From: user1 Date: Sat, 4 Oct 2025 11:58:24 -0400 Subject: [PATCH] Improved parsing utility bills --- MoneyMap/Services/OpenAIReceiptParser.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/MoneyMap/Services/OpenAIReceiptParser.cs b/MoneyMap/Services/OpenAIReceiptParser.cs index 7c3c47e..7214688 100644 --- a/MoneyMap/Services/OpenAIReceiptParser.cs +++ b/MoneyMap/Services/OpenAIReceiptParser.cs @@ -205,7 +205,15 @@ namespace MoneyMap.Services ] } -Extract all line items you can see on the receipt. For each item, try to extract quantity, unit price, and line total. If any field is not clearly visible, set it to null. Respond ONLY with valid JSON, no other text." +Extract all line items you can see on the receipt. For each item: +- description: The item or service name +- quantity: Only include if this is an actual countable product (like groceries). For services, fees, charges, or taxes, set to null. +- unitPrice: Price per unit if quantity applies, otherwise null +- lineTotal: The total amount for this line (required) + +For utility bills, service charges, fees, and taxes - these are NOT products with quantities, so set quantity and unitPrice to null. + +Respond ONLY with valid JSON, no other text." }, new {