banko-ai-assistant 1.0.6__py3-none-any.whl → 1.0.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
banko_ai/web/app.py CHANGED
@@ -114,13 +114,22 @@ def create_app() -> Flask:
114
114
  current_user = user_manager.get_current_user()
115
115
  user_id = current_user['id'] if current_user else None
116
116
 
117
- # Perform vector search
118
- results = search_engine.search_expenses(
119
- query=query,
120
- user_id=user_id,
121
- limit=limit,
122
- threshold=threshold
123
- )
117
+ # If no user is logged in, search all expenses (no user filtering)
118
+ # This ensures we get results from the database
119
+ if user_id is None:
120
+ results = search_engine.search_expenses(
121
+ query=query,
122
+ user_id=None,
123
+ limit=limit,
124
+ threshold=threshold
125
+ )
126
+ else:
127
+ results = search_engine.search_expenses(
128
+ query=query,
129
+ user_id=user_id,
130
+ limit=limit,
131
+ threshold=threshold
132
+ )
124
133
 
125
134
  # Convert to serializable format
126
135
  search_results = []
@@ -164,13 +173,22 @@ def create_app() -> Flask:
164
173
  language = data.get('language', 'en')
165
174
  user_id = user_manager.get_current_user()['id'] if user_manager.is_logged_in() else None
166
175
 
167
- # Search for relevant expenses
168
- search_results = search_engine.search_expenses(
169
- query=query,
170
- user_id=user_id,
171
- limit=5,
172
- threshold=0.7
173
- )
176
+ # If no user is logged in, search all expenses (no user filtering)
177
+ # This ensures we get results from the database
178
+ if user_id is None:
179
+ search_results = search_engine.search_expenses(
180
+ query=query,
181
+ user_id=None,
182
+ limit=5,
183
+ threshold=0.7
184
+ )
185
+ else:
186
+ search_results = search_engine.search_expenses(
187
+ query=query,
188
+ user_id=user_id,
189
+ limit=5,
190
+ threshold=0.7
191
+ )
174
192
 
175
193
  # Generate RAG response
176
194
  rag_response = ai_provider.generate_rag_response(
@@ -411,12 +429,23 @@ def create_app() -> Flask:
411
429
  # Search for relevant expenses using the configured AI service
412
430
  current_user = user_manager.get_current_user()
413
431
  user_id = current_user['id'] if current_user else None
414
- result = search_engine.search_expenses(
415
- query=prompt,
416
- user_id=user_id,
417
- limit=10,
418
- threshold=0.7
419
- )
432
+
433
+ # If no user is logged in, search all expenses (no user filtering)
434
+ # This ensures we get results from the database
435
+ if user_id is None:
436
+ result = search_engine.search_expenses(
437
+ query=prompt,
438
+ user_id=None,
439
+ limit=10,
440
+ threshold=0.7
441
+ )
442
+ else:
443
+ result = search_engine.search_expenses(
444
+ query=prompt,
445
+ user_id=user_id,
446
+ limit=10,
447
+ threshold=0.7
448
+ )
420
449
  print(f"Using {provider_info['name']} for response generation in {target_language}")
421
450
 
422
451
  # Generate RAG response with language preference
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: banko-ai-assistant
3
- Version: 1.0.6
3
+ Version: 1.0.7
4
4
  Summary: AI-powered expense analysis and RAG system with CockroachDB vector search and multi-provider AI support
5
5
  Author-email: Virag Tripathi <virag.tripathi@gmail.com>
6
6
  License-Expression: MIT
@@ -154,11 +154,11 @@ banko_ai/vector_search/enrichment.py,sha256=sRnFLNG9WGfq8j44T7krxHI-Lc2RSH68mt0I
154
154
  banko_ai/vector_search/generator.py,sha256=b2yFIZRVkeGXOvsQmrqvLG7EygQ5RS4c6EakeYCZeMM,13439
155
155
  banko_ai/vector_search/search.py,sha256=k3wo3zFJH9o-kBc-vAS-bdmM3LGX2vIk3u4cRA5QPXo,16915
156
156
  banko_ai/web/__init__.py,sha256=hjWVVxYpIZhOAN1qBf4xTd36a5AUHM03Q8BF8pykhJQ,363
157
- banko_ai/web/app.py,sha256=ALp-wx_HYGGGeEP-cTMBxxN1QNAtX5vOhHSigPO3J5Q,26340
157
+ banko_ai/web/app.py,sha256=EzQvT6ju-LuRWIvDZFzbs9BsZSglVUt7QvXZ-i_i0DM,27634
158
158
  banko_ai/web/auth.py,sha256=js6qIixSFHyLbETDm8GNLCPrDkCDcaQZPFOrqtZP1uw,2125
159
- banko_ai_assistant-1.0.6.dist-info/licenses/LICENSE,sha256=skG0LkywIClj8fgSIXiG6o9vUDJ678BKBObIyJ19OMw,1075
160
- banko_ai_assistant-1.0.6.dist-info/METADATA,sha256=Ng3npKvA8v3Z7ECuqMZgdzc4sxi4bBpRux8igxajXeg,13243
161
- banko_ai_assistant-1.0.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
162
- banko_ai_assistant-1.0.6.dist-info/entry_points.txt,sha256=IxPjBjMvbpCp-ikCA43bOSbYboTGPX4HYcZlvu2_vcA,47
163
- banko_ai_assistant-1.0.6.dist-info/top_level.txt,sha256=xNMa9Z67UssefOQ2ubFObtqUYIfYmCIclfz0xdo5OPE,9
164
- banko_ai_assistant-1.0.6.dist-info/RECORD,,
159
+ banko_ai_assistant-1.0.7.dist-info/licenses/LICENSE,sha256=skG0LkywIClj8fgSIXiG6o9vUDJ678BKBObIyJ19OMw,1075
160
+ banko_ai_assistant-1.0.7.dist-info/METADATA,sha256=ZzgkCtQk0exx4LTlw59d_gEte-q33SIRttz1_AX3QHA,13243
161
+ banko_ai_assistant-1.0.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
162
+ banko_ai_assistant-1.0.7.dist-info/entry_points.txt,sha256=IxPjBjMvbpCp-ikCA43bOSbYboTGPX4HYcZlvu2_vcA,47
163
+ banko_ai_assistant-1.0.7.dist-info/top_level.txt,sha256=xNMa9Z67UssefOQ2ubFObtqUYIfYmCIclfz0xdo5OPE,9
164
+ banko_ai_assistant-1.0.7.dist-info/RECORD,,