banko-ai-assistant 1.0.16__py3-none-any.whl → 1.0.18__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.
@@ -137,13 +137,15 @@ class WatsonxProvider(AIProvider):
137
137
 
138
138
  def get_available_models(self) -> List[str]:
139
139
  """Get list of available Watsonx models."""
140
+ # Only include models that are actually supported by Watsonx API
140
141
  return [
141
142
  'openai/gpt-oss-120b',
142
143
  'meta-llama/llama-2-70b-chat',
143
144
  'meta-llama/llama-2-13b-chat',
144
- 'meta-llama/llama-2-7b-chat',
145
- 'ibm/granite-13b-chat-v2',
146
- 'ibm/granite-13b-instruct-v2'
145
+ 'meta-llama/llama-2-7b-chat'
146
+ # Note: IBM Granite models may not be available in all regions/projects
147
+ # 'ibm/granite-13b-chat-v2',
148
+ # 'ibm/granite-13b-instruct-v2'
147
149
  ]
148
150
 
149
151
  def set_model(self, model_id: str) -> bool:
@@ -159,10 +161,12 @@ class WatsonxProvider(AIProvider):
159
161
  return False
160
162
 
161
163
  try:
162
- test_messages = [{"role": "user", "content": "Hello, this is a test message."}]
163
- response = self._call_watsonx_api(test_messages)
164
- return True
164
+ # Just test if we can get an access token - this is faster and more reliable
165
+ # than making a full API call for status checks
166
+ access_token = self._get_access_token()
167
+ return access_token is not None
165
168
  except Exception as e:
169
+ # If token request fails, the connection is not available
166
170
  return False
167
171
 
168
172
  def _get_access_token(self):
banko_ai/cli.py CHANGED
@@ -260,6 +260,12 @@ def help():
260
260
 
261
261
  This is a modern AI-powered expense analysis application with RAG capabilities.
262
262
 
263
+ PREREQUISITES:
264
+ --------------
265
+ - CockroachDB v25.2.4+ (recommended: v25.3.1)
266
+ - Vector index feature enabled: SET CLUSTER SETTING feature.vector_index.enabled = true;
267
+ - Start single node: cockroach start-single-node --insecure --store=./cockroach-data --listen-addr=localhost:26257 --http-addr=localhost:8080 --background
268
+
263
269
  QUICK START:
264
270
  -----------
265
271
  1. Set up your environment variables:
@@ -515,6 +515,7 @@
515
515
  <div class="flex items-center space-x-2">
516
516
  <i class="fas fa-${data.ai_provider === 'connected' ? 'check-circle text-green-500' : 'times-circle text-red-500'}"></i>
517
517
  <span class="text-sm text-cockroach-text-light">AI Provider (${data.ai_service}): ${data.ai_provider}</span>
518
+ ${data.ai_provider === 'disconnected' && data.ai_provider_available ? '<span class="text-xs text-yellow-500 ml-1">(Model switched, connection test failed)</span>' : ''}
518
519
  </div>
519
520
  <div class="flex items-center space-x-2">
520
521
  <i class="fas fa-robot text-blue-500"></i>
banko_ai/web/app.py CHANGED
@@ -452,7 +452,9 @@ def create_app() -> Flask:
452
452
  # Check AI provider
453
453
  ai_status = "unknown"
454
454
  current_model = "unknown"
455
+ ai_provider_available = False
455
456
  if ai_provider:
457
+ ai_provider_available = True
456
458
  ai_status = "connected" if ai_provider.test_connection() else "disconnected"
457
459
  current_model = ai_provider.get_current_model()
458
460
 
@@ -461,7 +463,8 @@ def create_app() -> Flask:
461
463
  'database': 'connected',
462
464
  'ai_provider': ai_status,
463
465
  'ai_service': config.ai_service,
464
- 'current_model': current_model
466
+ 'current_model': current_model,
467
+ 'ai_provider_available': ai_provider_available
465
468
  })
466
469
 
467
470
  except Exception as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: banko-ai-assistant
3
- Version: 1.0.16
3
+ Version: 1.0.18
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
@@ -30,9 +30,9 @@ Requires-Dist: jinja2<4.0.0,>=3.1.0
30
30
  Requires-Dist: psycopg2-binary<3.0.0,>=2.9.0
31
31
  Requires-Dist: sqlalchemy<3.0.0,>=2.0.0
32
32
  Requires-Dist: sqlalchemy-cockroachdb<3.0.0,>=2.0.0
33
- Requires-Dist: sentence-transformers<3.0.0,>=2.2.0
34
- Requires-Dist: boto3<1.35.0,>=1.34.0
35
- Requires-Dist: botocore<1.35.0,>=1.34.0
33
+ Requires-Dist: sentence-transformers<4.0.0,>=3.1.0
34
+ Requires-Dist: boto3<1.41.0,>=1.40.0
35
+ Requires-Dist: botocore<1.41.0,>=1.40.0
36
36
  Requires-Dist: openai<2.0.0,>=1.11.0
37
37
  Requires-Dist: requests<3.0.0,>=2.32.4
38
38
  Requires-Dist: numpy<2.0.0,>=1.26.0
@@ -76,9 +76,48 @@ A modern AI-powered expense analysis application with Retrieval-Augmented Genera
76
76
 
77
77
  ### Prerequisites
78
78
 
79
- - Python 3.8+
80
- - CockroachDB (running locally or cloud)
81
- - AI Provider API Key (OpenAI, AWS, IBM Watsonx, or Google Gemini)
79
+ - **Python 3.8+**
80
+ - **CockroachDB v25.2.4+** (recommended: [v25.3.1](https://www.cockroachlabs.com/docs/releases/v25.3#v25-3-1))
81
+ - **Vector Index Feature Enabled** (required for vector search)
82
+ - **AI Provider API Key** (OpenAI, AWS, IBM Watsonx, or Google Gemini)
83
+
84
+ #### CockroachDB Setup
85
+
86
+ 1. **Download and Install CockroachDB**:
87
+ ```bash
88
+ # Download CockroachDB v25.3.1 (recommended)
89
+ # Visit: https://www.cockroachlabs.com/docs/releases/v25.3#v25-3-1
90
+
91
+ # Or install via package manager
92
+ brew install cockroachdb/tap/cockroach # macOS
93
+ ```
94
+
95
+ 2. **Start CockroachDB Single Node**:
96
+ ```bash
97
+ # Start a single-node cluster (for development)
98
+ cockroach start-single-node \
99
+ --insecure \
100
+ --store=./cockroach-data \
101
+ --listen-addr=localhost:26257 \
102
+ --http-addr=localhost:8080 \
103
+ --background
104
+ ```
105
+
106
+ 3. **Enable Vector Index Feature**:
107
+ ```sql
108
+ -- Connect to the database
109
+ cockroach sql --url="cockroachdb://root@localhost:26257/defaultdb?sslmode=disable"
110
+
111
+ -- Enable vector index feature (required for vector search)
112
+ SET CLUSTER SETTING feature.vector_index.enabled = true;
113
+ ```
114
+
115
+ 4. **Verify Setup**:
116
+ ```sql
117
+ -- Check if vector index is enabled
118
+ SHOW CLUSTER SETTING feature.vector_index.enabled;
119
+ -- Should return: true
120
+ ```
82
121
 
83
122
  ### Installation
84
123
 
@@ -94,7 +133,7 @@ export WATSONX_MODEL_ID="openai/gpt-oss-120b"
94
133
  export DATABASE_URL="cockroachdb://root@localhost:26257/defaultdb?sslmode=disable"
95
134
 
96
135
  # Run the application
97
- python -m banko_ai
136
+ python -m banko-ai
98
137
  ```
99
138
 
100
139
  #### Option 2: Development Installation
@@ -230,14 +269,14 @@ banko-ai help
230
269
 
231
270
  ## 🔌 API Endpoints
232
271
 
233
- | Endpoint | Method | Description |
234
- |----------|--------|-------------|
235
- | `/` | GET | Web interface |
236
- | `/api/health` | GET | System health check |
237
- | `/api/ai-providers` | GET | Available AI providers |
238
- | `/api/models` | GET | Available models for current provider |
239
- | `/api/search` | POST | Vector search expenses |
240
- | `/api/rag` | POST | RAG-based Q&A |
272
+ | Endpoint | Method | Description |
273
+ |---------------------|--------|---------------------------------------|
274
+ | `/` | GET | Web interface |
275
+ | `/api/health` | GET | System health check |
276
+ | `/api/ai-providers` | GET | Available AI providers |
277
+ | `/api/models` | GET | Available models for current provider |
278
+ | `/api/search` | POST | Vector search expenses |
279
+ | `/api/rag` | POST | RAG-based Q&A |
241
280
 
242
281
  ### API Examples
243
282
 
@@ -366,10 +405,36 @@ banko_ai/
366
405
 
367
406
  ### Common Issues
368
407
 
408
+ **CockroachDB Version Issues**
409
+ ```bash
410
+ # Check CockroachDB version (must be v25.2.4+)
411
+ cockroach version
412
+
413
+ # If version is too old, download v25.3.1:
414
+ # https://www.cockroachlabs.com/docs/releases/v25.3#v25-3-1
415
+ ```
416
+
417
+ **Vector Index Feature Not Enabled**
418
+ ```bash
419
+ # Connect to database and enable vector index feature
420
+ cockroach sql --url="cockroachdb://root@localhost:26257/defaultdb?sslmode=disable"
421
+
422
+ # Enable vector index feature
423
+ SET CLUSTER SETTING feature.vector_index.enabled = true;
424
+
425
+ # Verify it's enabled
426
+ SHOW CLUSTER SETTING feature.vector_index.enabled;
427
+ ```
428
+
369
429
  **Database Connection Error**
370
430
  ```bash
371
- # Check CockroachDB is running
372
- cockroach start --insecure --listen-addr=localhost:26257
431
+ # Start CockroachDB single node
432
+ cockroach start-single-node \
433
+ --insecure \
434
+ --store=./cockroach-data \
435
+ --listen-addr=localhost:26257 \
436
+ --http-addr=localhost:8080 \
437
+ --background
373
438
 
374
439
  # Verify database exists
375
440
  cockroach sql --url="cockroachdb://root@localhost:26257/defaultdb?sslmode=disable" --execute "SHOW TABLES;"
@@ -417,4 +482,4 @@ For issues and questions:
417
482
 
418
483
  ---
419
484
 
420
- **Built with ❤️ using CockroachDB, Flask, and modern AI technologies**
485
+ **Built with ❤️ using CockroachDB, Flask, and modern AI technologies such as **
@@ -1,13 +1,13 @@
1
1
  banko_ai/__init__.py,sha256=G1InyKemqQxP9xx6yGZgolBmrmOLSpBXqGYY8LaFOeo,568
2
2
  banko_ai/__main__.py,sha256=U-KkrXtL8JNIyV25PE5v_eYhlhjR7jd6kG-txfYfs0M,709
3
- banko_ai/cli.py,sha256=7lMeDRIuJjeAkrVMzw2YmJp4t10KLGP7TRIywUSOkeU,13884
3
+ banko_ai/cli.py,sha256=goTkY3qhTrGvmERbapKztYH-g7fAemxThZJSO7Ll2HI,14205
4
4
  banko_ai/ai_providers/__init__.py,sha256=JdBgw5Mji2pe9nU-aiRYUmJuZk0q8KbcMtbpMJC5Dq8,483
5
5
  banko_ai/ai_providers/aws_provider.py,sha256=-tR-8tlEeSL-Fspx05tTMFguvQylkW_pz0PI2XJEByM,13074
6
6
  banko_ai/ai_providers/base.py,sha256=zbuAgkHIfJ0YkG83LXzieJuvXBcB2-nx7NhbL-I4Pf0,4725
7
7
  banko_ai/ai_providers/factory.py,sha256=Bqq9HcbyTfPvaOTxsHSM9eSvkB71cJoq21cMmXo4LLc,2885
8
8
  banko_ai/ai_providers/gemini_provider.py,sha256=KqzHLLl7EYnai9-zFenRmktVk0zOA8AtsYScQZIcdLU,13044
9
9
  banko_ai/ai_providers/openai_provider.py,sha256=Myu2And6kTD2EgIVcWHGak5fDIq0pu1HQzf-jj72y3k,11657
10
- banko_ai/ai_providers/watsonx_provider.py,sha256=Jl33LKApIED4nl2EmhpSp3x7aFYe4d2QSqq5udtGlZg,39258
10
+ banko_ai/ai_providers/watsonx_provider.py,sha256=PlS0OiJau0SbENH3f2UTz3QqExARPEMmOFecr5dkG-g,39556
11
11
  banko_ai/config/__init__.py,sha256=YObKfKjjW89kSfARiTzXnGuSPz1C92aSMKgmO3BtQb8,133
12
12
  banko_ai/config/settings.py,sha256=6M8YoaxzyCULn6BOot4hahtDkgjsgyLmMd8BxDKVt4k,9317
13
13
  banko_ai/static/Anallytics.png,sha256=fWLddd5hlB4YEUYSIzOFVNnTny6D8VExQeVn31mywTc,80242
@@ -142,7 +142,7 @@ banko_ai/static/creditcard_files/vendor-react-76e71fd67c83934b.mjs,sha256=LCx9dM
142
142
  banko_ai/static/creditcard_files/visual-search-fe95849c7568d600.mjs,sha256=dsIqV8HCK5_oYVudHyTDnXpfXiggV1a0x6JjFPLT4eE,267636
143
143
  banko_ai/static/css/style.css,sha256=9Vz6EC3xLtqOsrSxYX3-W24ZnSk1eDSsUl6-bICjnEI,24116
144
144
  banko_ai/templates/base.html,sha256=s8Dfa0Eg9Lze6zeruVSbXcLJtv-Vo7KhKvk4M3HIhxM,2237
145
- banko_ai/templates/dashboard.html,sha256=-HIQ3sU86hqVn1jGeHV8_w2HlnPZ4uS2cD-BNGUaroU,27674
145
+ banko_ai/templates/dashboard.html,sha256=jSKF4HqJHilatXsftXMZJMFPtp8jm0qWKa9r3yya8dc,27883
146
146
  banko_ai/templates/index.html,sha256=SkDXWH_ttH2T_a_46_OETgy1Q3zDfvot9eEKGB0S1x0,66973
147
147
  banko_ai/templates/login.html,sha256=YPMtJcvCzFlknwmUrG7VskeM691J4msAjZw-t4CcPn4,2063
148
148
  banko_ai/utils/__init__.py,sha256=0n1JYzZUWwgwOzV82I6OnmfUV_TOnal1V0DoEb0E2Cs,225
@@ -154,11 +154,11 @@ banko_ai/vector_search/enrichment.py,sha256=tgAImLehkp2kL46vI5GEHsE8B5E4gT3PweXZ
154
154
  banko_ai/vector_search/generator.py,sha256=6SV6_RZ4M4-TfJvxlXHZY1p-zcLKpIJm0p871nmEjmI,17837
155
155
  banko_ai/vector_search/search.py,sha256=RiDxqcRblAFSmxMvxy9nRRrw22OtVMHP5_rsvQsS_MU,18763
156
156
  banko_ai/web/__init__.py,sha256=hjWVVxYpIZhOAN1qBf4xTd36a5AUHM03Q8BF8pykhJQ,363
157
- banko_ai/web/app.py,sha256=Temx39TX19idHrlrUwb_2QLr1GSZZVjqhyJC299NFMY,32145
157
+ banko_ai/web/app.py,sha256=dmr-fIKFmN93vijnTrBWbuz7rg3FT-iRZaBPvUJCYFY,32296
158
158
  banko_ai/web/auth.py,sha256=js6qIixSFHyLbETDm8GNLCPrDkCDcaQZPFOrqtZP1uw,2125
159
- banko_ai_assistant-1.0.16.dist-info/licenses/LICENSE,sha256=skG0LkywIClj8fgSIXiG6o9vUDJ678BKBObIyJ19OMw,1075
160
- banko_ai_assistant-1.0.16.dist-info/METADATA,sha256=BuVSoi6etHKRv2qq6rLW5FucRSzlUSuZip87XXi0y-g,13505
161
- banko_ai_assistant-1.0.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
162
- banko_ai_assistant-1.0.16.dist-info/entry_points.txt,sha256=IxPjBjMvbpCp-ikCA43bOSbYboTGPX4HYcZlvu2_vcA,47
163
- banko_ai_assistant-1.0.16.dist-info/top_level.txt,sha256=xNMa9Z67UssefOQ2ubFObtqUYIfYmCIclfz0xdo5OPE,9
164
- banko_ai_assistant-1.0.16.dist-info/RECORD,,
159
+ banko_ai_assistant-1.0.18.dist-info/licenses/LICENSE,sha256=skG0LkywIClj8fgSIXiG6o9vUDJ678BKBObIyJ19OMw,1075
160
+ banko_ai_assistant-1.0.18.dist-info/METADATA,sha256=-9ZE8-5drz7Ms8IHohKrAqQT7nsLnVIX6vCd4KKmEZI,15573
161
+ banko_ai_assistant-1.0.18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
162
+ banko_ai_assistant-1.0.18.dist-info/entry_points.txt,sha256=IxPjBjMvbpCp-ikCA43bOSbYboTGPX4HYcZlvu2_vcA,47
163
+ banko_ai_assistant-1.0.18.dist-info/top_level.txt,sha256=xNMa9Z67UssefOQ2ubFObtqUYIfYmCIclfz0xdo5OPE,9
164
+ banko_ai_assistant-1.0.18.dist-info/RECORD,,