sammy786 commited on
Commit
ead97d1
·
verified ·
1 Parent(s): 6367cc7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -498,18 +498,18 @@ def get_recommendation_with_agent(user_id, merchant, category, amount):
498
  llamaindex_context = None
499
  spending_warnings = None
500
 
501
- if rag.enabled: # rag was initialized at the top of the file
502
  logger.info("📚 Fetching RAG context...")
503
 
504
  # Get card-specific context
505
- llamaindex_context = rag.get_card_context(
506
  card_name=card_name, # This variable already exists in your code
507
  merchant=merchant,
508
  category=category
509
  )
510
 
511
  # Get spending warnings
512
- spending_warnings = rag.get_spending_warnings(
513
  card_name=card_name,
514
  category=category,
515
  amount=amount
 
498
  llamaindex_context = None
499
  spending_warnings = None
500
 
501
+ if card_rag.enabled: # rag was initialized at the top of the file
502
  logger.info("📚 Fetching RAG context...")
503
 
504
  # Get card-specific context
505
+ llamaindex_context = card_rag.get_card_context(
506
  card_name=card_name, # This variable already exists in your code
507
  merchant=merchant,
508
  category=category
509
  )
510
 
511
  # Get spending warnings
512
+ spending_warnings = card_rag.get_spending_warnings(
513
  card_name=card_name,
514
  category=category,
515
  amount=amount