Commit History

Fix endpoint to use user-provided budget_amount even when has_previous_data is true
26c0248
Running

LogicGoInfotechSpaces commited on

Add debug logging to track budget_amount usage and ensure user-provided amount is used
4b9447f

LogicGoInfotechSpaces commited on

Fix average_expense to use user-provided budget_amount and enhance OpenAI prompt to recommend decrease when budget is too high
dfe0ed3

LogicGoInfotechSpaces commited on

Enhance OpenAI prompt to explicitly mention user's budget amount and base recommendations on it
e185930

LogicGoInfotechSpaces commited on

Fix undefined variable error and ensure user-provided budget_amount is used for OpenAI recommendations
24cd56b

LogicGoInfotechSpaces commited on

Prioritize user-provided budget_amount over budget's maxAmount when category_id is a budget _id
ef928f0

LogicGoInfotechSpaces commited on

Fix get_recommendation_for_category to generate recommendations when category_id is a budget _id
af904a9

LogicGoInfotechSpaces commited on

Add logic to handle budget _id in get_recommendation_for_category - extract categories and generate recommendations
e4b048c

LogicGoInfotechSpaces commited on

Remove all excessive debug logs from check_user_has_category_data
91647c6

LogicGoInfotechSpaces commited on

Fix budget _id check logic and remove excessive debug logs
f1019bd

LogicGoInfotechSpaces commited on

Add check for budget _id when category_id is provided - handle case where user passes budget ID instead of category ID
4a08c54

LogicGoInfotechSpaces commited on

Add multiple nested query patterns to check_user_has_category_data for better MongoDB compatibility
bd8f603

LogicGoInfotechSpaces commited on

Prioritize nested category structure check in check_user_has_category_data
88106f3

LogicGoInfotechSpaces commited on

Add comprehensive debug logging for expense checking in check_user_has_category_data
5c831e5

LogicGoInfotechSpaces commited on

Add detailed debug logging to understand budget category structure and why category_ids are not being matched
32fb484

LogicGoInfotechSpaces commited on

Add new endpoint /recommendations/by-name to accept Head Category names instead of category_id for easier frontend integration
ecfd501

LogicGoInfotechSpaces commited on

Fix UnboundLocalError: calculate monthly statistics from budgets when data variable doesn't exist
6a4c6a3

LogicGoInfotechSpaces commited on

Improve check_user_has_category_data to comprehensively search budgets collection and fix logic to prioritize historical data over budget_amount
21a5b7f

LogicGoInfotechSpaces commited on

Add explicit instructions and system message to ensure OpenAI provides unique reasons for each recommendation
2210c72

LogicGoInfotechSpaces commited on

Remove simulated data creation - recommendations for new budgets now based on provided budget_amount and category knowledge only, not fake trends
f26b6aa

LogicGoInfotechSpaces commited on

Change budget_amount validation to auto-cap corrupted data instead of rejecting requests
94062ea

LogicGoInfotechSpaces commited on

Enhance OpenAI prompt to analyze actual spending data (trends, variability) for intelligent recommendations
5701ca8

LogicGoInfotechSpaces commited on

Add API-level validation for budget_amount to catch corrupted data early and provide clear error messages
0a1d03f

LogicGoInfotechSpaces commited on

Add aggressive final validation to ALWAYS prevent lazy 'keep' recommendations and handle data corruption
eb33258

LogicGoInfotechSpaces commited on

Add validation to prevent always 'keep' recommendations - override lazy OpenAI responses with intelligent analysis
b3d55f3

LogicGoInfotechSpaces commited on

Update OpenAI prompt to be global/worldwide instead of India-specific for international users
9ab0023

LogicGoInfotechSpaces commited on

Improve OpenAI prompt to provide varied recommendations (increase/decrease/keep) based on spending trends and patterns
4040861

LogicGoInfotechSpaces commited on

Add test.py and enhanced debug logging for recommendation generation
c248b26

LogicGoInfotechSpaces commited on

Fix recommendation generation when user has data but no recommendations found - Fixed MongoDB query structure for budget lookup - Added fallback logic to generate recommendations from budget data - Added debug logging
dccf408

LogicGoInfotechSpaces commited on

Add budget_amount parameter to recommendations/check endpoint to generate recommendations based on provided budget
e95b2a4

LogicGoInfotechSpaces commited on

Fix route order: Move POST /recommendations/check before GET /recommendations/{user_id} to prevent 405 error
13edd0d

LogicGoInfotechSpaces commited on

Add POST endpoint to check user category data and return recommendations
9e1b2d4

LogicGoInfotechSpaces commited on

Handle category field as string name (not ObjectId) in budgets
5fda188

LogicGoInfotechSpaces commited on

Change response to show category name and category_id instead of budget_name
212462e

LogicGoInfotechSpaces commited on

Improve category name lookup with better logging and fallback searches
a67e1f8

LogicGoInfotechSpaces commited on

Use category ID from budgets and lookup names from headCategories and categories collections
b71b4c6

LogicGoInfotechSpaces commited on

Add enhanced logging to track OpenAI API usage vs rule-based recommendations
46c4337

LogicGoInfotechSpaces commited on

Clean up code: Remove commented duplicate code, fix category filtering logic, improve exception handling
6ec895c

LogicGoInfotechSpaces commited on

Fix bugs and improve budget recommendation system: Add API logging, fix OpenAI integration, enhance budget query patterns, add category extraction from headCategories, improve error handling
a600a52

LogicGoInfotechSpaces commited on