From a3f2db0760dc19c674fb261c2bb69e144c0a0463 Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Fri, 3 Jul 2026 09:03:17 +0530 Subject: [PATCH] switch to gemini-flash-lite-2.5 --- README.md | 2 +- app/worker.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b9f9155..eb4a3c4 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ An asynchronous transactional data cleaning, validation, and LLM powered categor - Reads multi format dates and handles missing transaction IDs by auto generating unique fallbacks, and parses messy amounts with currency signs and commas cleanly. - Offloads validation, spend conversion, and analysis to a Celery background worker backed by Redis. -- Integrates with the Google GenAI SDK (`gemini-3.5-flash`) using structured output schemas to categorize transaction records into database-defined custom categories. +- Integrates with the Google GenAI SDK (`gemini-2.5-flash-lite` 75% cheaper than `gemini-3.5-flash-lite with no tangible decrease in performance) using structured output schemas to categorize transaction records into database-defined custom categories. - Uses Redis caching with a 24-hour TTL to store live exchange rates, falling back to a hardcoded rate of `93.0` if offline. - Statistical Anomaly Detection: - Flags transactions exceeding 3 times the account's median spend as statistical outliers. diff --git a/app/worker.py b/app/worker.py index 18ad425..fd12491 100644 --- a/app/worker.py +++ b/app/worker.py @@ -70,7 +70,7 @@ async def classify_transactions_batch( interaction = await loop.run_in_executor( None, lambda: client.interactions.create( - model="gemini-3.5-flash", + model="gemini-2.5-flash-lite", input=input_prompt, response_format={ "type": "text",