banko-ai-assistant 1.0.0__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/__init__.py +19 -0
- banko_ai/__main__.py +10 -0
- banko_ai/ai_providers/__init__.py +18 -0
- banko_ai/ai_providers/aws_provider.py +337 -0
- banko_ai/ai_providers/base.py +175 -0
- banko_ai/ai_providers/factory.py +84 -0
- banko_ai/ai_providers/gemini_provider.py +340 -0
- banko_ai/ai_providers/openai_provider.py +295 -0
- banko_ai/ai_providers/watsonx_provider.py +591 -0
- banko_ai/cli.py +374 -0
- banko_ai/config/__init__.py +5 -0
- banko_ai/config/settings.py +216 -0
- banko_ai/static/Anallytics.png +0 -0
- banko_ai/static/Graph.png +0 -0
- banko_ai/static/Graph2.png +0 -0
- banko_ai/static/ai-status.png +0 -0
- banko_ai/static/banko-ai-assistant-watsonx.gif +0 -0
- banko_ai/static/banko-db-ops.png +0 -0
- banko_ai/static/banko-response.png +0 -0
- banko_ai/static/cache-stats.png +0 -0
- banko_ai/static/creditcard.png +0 -0
- banko_ai/static/profilepic.jpeg +0 -0
- banko_ai/static/query_watcher.png +0 -0
- banko_ai/static/roach-logo.svg +54 -0
- banko_ai/static/watsonx-icon.svg +1 -0
- banko_ai/templates/base.html +59 -0
- banko_ai/templates/dashboard.html +569 -0
- banko_ai/templates/index.html +1499 -0
- banko_ai/templates/login.html +41 -0
- banko_ai/utils/__init__.py +8 -0
- banko_ai/utils/cache_manager.py +525 -0
- banko_ai/utils/database.py +202 -0
- banko_ai/utils/migration.py +123 -0
- banko_ai/vector_search/__init__.py +18 -0
- banko_ai/vector_search/enrichment.py +278 -0
- banko_ai/vector_search/generator.py +329 -0
- banko_ai/vector_search/search.py +463 -0
- banko_ai/web/__init__.py +13 -0
- banko_ai/web/app.py +668 -0
- banko_ai/web/auth.py +73 -0
- banko_ai_assistant-1.0.0.dist-info/METADATA +414 -0
- banko_ai_assistant-1.0.0.dist-info/RECORD +46 -0
- banko_ai_assistant-1.0.0.dist-info/WHEEL +5 -0
- banko_ai_assistant-1.0.0.dist-info/entry_points.txt +2 -0
- banko_ai_assistant-1.0.0.dist-info/licenses/LICENSE +21 -0
- banko_ai_assistant-1.0.0.dist-info/top_level.txt +1 -0
banko_ai/web/auth.py
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
"""
|
2
|
+
User authentication and management.
|
3
|
+
|
4
|
+
This module provides simple user authentication for the Banko AI Assistant.
|
5
|
+
"""
|
6
|
+
|
7
|
+
import uuid
|
8
|
+
from typing import Optional, Dict, Any
|
9
|
+
from flask import session
|
10
|
+
|
11
|
+
|
12
|
+
class UserManager:
|
13
|
+
"""Simple user management for the application."""
|
14
|
+
|
15
|
+
def __init__(self):
|
16
|
+
"""Initialize the user manager."""
|
17
|
+
self.users = {} # In production, this would be a database
|
18
|
+
|
19
|
+
def create_user(self, username: str, email: str = None) -> str:
|
20
|
+
"""
|
21
|
+
Create a new user.
|
22
|
+
|
23
|
+
Args:
|
24
|
+
username: Username for the user
|
25
|
+
email: Optional email address
|
26
|
+
|
27
|
+
Returns:
|
28
|
+
User ID
|
29
|
+
"""
|
30
|
+
user_id = str(uuid.uuid4())
|
31
|
+
self.users[user_id] = {
|
32
|
+
"id": user_id,
|
33
|
+
"username": username,
|
34
|
+
"email": email,
|
35
|
+
"created_at": None # Would be datetime in production
|
36
|
+
}
|
37
|
+
return user_id
|
38
|
+
|
39
|
+
def get_user(self, user_id: str) -> Optional[Dict[str, Any]]:
|
40
|
+
"""Get user by ID."""
|
41
|
+
return self.users.get(user_id)
|
42
|
+
|
43
|
+
def get_current_user(self) -> Optional[Dict[str, Any]]:
|
44
|
+
"""Get current user from session."""
|
45
|
+
user_id = session.get('user_id')
|
46
|
+
if user_id:
|
47
|
+
return self.get_user(user_id)
|
48
|
+
return None
|
49
|
+
|
50
|
+
def login_user(self, user_id: str) -> bool:
|
51
|
+
"""Login user by setting session."""
|
52
|
+
if user_id in self.users:
|
53
|
+
session['user_id'] = user_id
|
54
|
+
return True
|
55
|
+
return False
|
56
|
+
|
57
|
+
def logout_user(self) -> None:
|
58
|
+
"""Logout current user."""
|
59
|
+
session.pop('user_id', None)
|
60
|
+
|
61
|
+
def is_logged_in(self) -> bool:
|
62
|
+
"""Check if user is logged in."""
|
63
|
+
return 'user_id' in session and session['user_id'] in self.users
|
64
|
+
|
65
|
+
def get_or_create_current_user(self) -> str:
|
66
|
+
"""Get or create current user."""
|
67
|
+
if self.is_logged_in():
|
68
|
+
return session['user_id']
|
69
|
+
|
70
|
+
# Create a default user
|
71
|
+
user_id = self.create_user("Default User")
|
72
|
+
self.login_user(user_id)
|
73
|
+
return user_id
|
@@ -0,0 +1,414 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: banko-ai-assistant
|
3
|
+
Version: 1.0.0
|
4
|
+
Summary: AI-powered expense analysis and RAG system with CockroachDB vector search and multi-provider AI support
|
5
|
+
Author-email: Virag Tripathi <virag.tripathi@gmail.com>
|
6
|
+
License-Expression: MIT
|
7
|
+
Project-URL: Homepage, https://github.com/cockroachlabs-field/banko-ai-assistant-rag-demo
|
8
|
+
Project-URL: Repository, https://github.com/cockroachlabs-field/banko-ai-assistant-rag-demo
|
9
|
+
Project-URL: Documentation, https://github.com/cockroachlabs-field/banko-ai-assistant-rag-demo#readme
|
10
|
+
Project-URL: Bug Tracker, https://github.com/cockroachlabs-field/banko-ai-assistant-rag-demo/issues
|
11
|
+
Keywords: ai,rag,vector-search,cockroachdb,expense-analysis,financial-ai
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
13
|
+
Classifier: Intended Audience :: Developers
|
14
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
15
|
+
Classifier: Topic :: Office/Business :: Financial
|
16
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
23
|
+
Classifier: Operating System :: OS Independent
|
24
|
+
Requires-Python: >=3.8
|
25
|
+
Description-Content-Type: text/markdown
|
26
|
+
License-File: LICENSE
|
27
|
+
Requires-Dist: flask<4.0.0,>=3.0.0
|
28
|
+
Requires-Dist: werkzeug<4.0.0,>=3.0.0
|
29
|
+
Requires-Dist: jinja2<4.0.0,>=3.1.0
|
30
|
+
Requires-Dist: psycopg2-binary<3.0.0,>=2.9.0
|
31
|
+
Requires-Dist: sqlalchemy<3.0.0,>=2.0.0
|
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
|
36
|
+
Requires-Dist: openai<2.0.0,>=1.11.0
|
37
|
+
Requires-Dist: requests<3.0.0,>=2.32.4
|
38
|
+
Requires-Dist: numpy<2.0.0,>=1.26.0
|
39
|
+
Requires-Dist: pandas<3.0.0,>=2.2.0
|
40
|
+
Requires-Dist: faker<25.0.0,>=24.0.0
|
41
|
+
Requires-Dist: python-dateutil<3.0.0,>=2.8.0
|
42
|
+
Requires-Dist: pytz<2025.0,>=2024.0
|
43
|
+
Requires-Dist: tqdm<5.0.0,>=4.66.3
|
44
|
+
Requires-Dist: tiktoken<1.0.0,>=0.5.0
|
45
|
+
Requires-Dist: google-cloud-aiplatform<2.0.0,>=1.38.0
|
46
|
+
Requires-Dist: google-auth<3.0.0,>=2.23.0
|
47
|
+
Provides-Extra: dev
|
48
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
49
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
50
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
51
|
+
Requires-Dist: flake8>=6.0.0; extra == "dev"
|
52
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
53
|
+
Dynamic: license-file
|
54
|
+
|
55
|
+
# 🤖 Banko AI Assistant - RAG Demo
|
56
|
+
|
57
|
+
A modern AI-powered expense analysis application with Retrieval-Augmented Generation (RAG) capabilities, built with CockroachDB vector search and multiple AI provider support.
|
58
|
+
|
59
|
+

|
60
|
+
|
61
|
+
## ✨ Features
|
62
|
+
|
63
|
+
- **🔍 Advanced Vector Search**: Enhanced expense search using CockroachDB vector indexes
|
64
|
+
- **🤖 Multi-AI Provider Support**: OpenAI, AWS Bedrock, IBM Watsonx, Google Gemini
|
65
|
+
- **🔄 Dynamic Model Switching**: Switch between models without restarting the app
|
66
|
+
- **👤 User-Specific Indexing**: User-based vector indexes with regional partitioning
|
67
|
+
- **📊 Data Enrichment**: Contextual expense descriptions for better search accuracy
|
68
|
+
- **💾 Intelligent Caching**: Multi-layer caching system for optimal performance
|
69
|
+
- **🌐 Modern Web Interface**: Clean, responsive UI with real-time chat
|
70
|
+
- **📈 Analytics Dashboard**: Comprehensive expense analysis and insights
|
71
|
+
- **📦 PyPI Package**: Easy installation with `pip install banko-ai-assistant`
|
72
|
+
- **🎯 Enhanced Context**: Merchant and amount information included in search context
|
73
|
+
- **⚡ Performance Optimized**: User-specific vector indexes for faster queries
|
74
|
+
|
75
|
+
## 🚀 Quick Start
|
76
|
+
|
77
|
+
### Prerequisites
|
78
|
+
|
79
|
+
- Python 3.8+
|
80
|
+
- CockroachDB (running locally or cloud)
|
81
|
+
- AI Provider API Key (OpenAI, AWS, IBM Watsonx, or Google Gemini)
|
82
|
+
|
83
|
+
### Installation
|
84
|
+
|
85
|
+
#### Option 1: PyPI Installation (Recommended)
|
86
|
+
```bash
|
87
|
+
# Install from PyPI (when published)
|
88
|
+
pip install banko-ai-assistant
|
89
|
+
|
90
|
+
# Run the application
|
91
|
+
banko-ai run
|
92
|
+
```
|
93
|
+
|
94
|
+
#### Option 2: Development Installation
|
95
|
+
```bash
|
96
|
+
# Clone the repository
|
97
|
+
git clone <repository-url>
|
98
|
+
cd banko-ai-assistant-rag-demo
|
99
|
+
|
100
|
+
# Install the package in development mode
|
101
|
+
pip install -e .
|
102
|
+
|
103
|
+
# Run the application
|
104
|
+
banko-ai run
|
105
|
+
```
|
106
|
+
|
107
|
+
#### Option 3: Direct Dependencies
|
108
|
+
```bash
|
109
|
+
# Install dependencies directly
|
110
|
+
pip install -r requirements.txt
|
111
|
+
|
112
|
+
# Run the original app.py (legacy method)
|
113
|
+
python app.py
|
114
|
+
```
|
115
|
+
|
116
|
+
### Configuration
|
117
|
+
|
118
|
+
Set up your environment variables:
|
119
|
+
|
120
|
+
```bash
|
121
|
+
# Required: Database connection
|
122
|
+
export DATABASE_URL="cockroachdb://root@localhost:26257/banko_ai?sslmode=disable"
|
123
|
+
|
124
|
+
# Required: AI Service (choose one)
|
125
|
+
export AI_SERVICE="watsonx" # or "openai", "aws", "gemini"
|
126
|
+
|
127
|
+
# AI Provider Configuration (choose based on AI_SERVICE)
|
128
|
+
# For IBM Watsonx:
|
129
|
+
export WATSONX_API_KEY="your_api_key_here"
|
130
|
+
export WATSONX_PROJECT_ID="your_project_id_here"
|
131
|
+
export WATSONX_MODEL="meta-llama/llama-2-70b-chat"
|
132
|
+
|
133
|
+
# For OpenAI:
|
134
|
+
export OPENAI_API_KEY="your_api_key_here"
|
135
|
+
export OPENAI_MODEL="gpt-3.5-turbo"
|
136
|
+
|
137
|
+
# For AWS Bedrock:
|
138
|
+
export AWS_ACCESS_KEY_ID="your_access_key"
|
139
|
+
export AWS_SECRET_ACCESS_KEY="your_secret_key"
|
140
|
+
export AWS_REGION="us-east-1"
|
141
|
+
export AWS_MODEL="anthropic.claude-3-sonnet-20240229-v1:0"
|
142
|
+
|
143
|
+
# For Google Gemini:
|
144
|
+
export GOOGLE_APPLICATION_CREDENTIALS="path/to/service-account.json"
|
145
|
+
export GOOGLE_MODEL="gemini-1.5-pro"
|
146
|
+
```
|
147
|
+
|
148
|
+
### Running the Application
|
149
|
+
|
150
|
+
The application automatically creates database tables and loads sample data (5000 records by default):
|
151
|
+
|
152
|
+
```bash
|
153
|
+
# Start with default settings (5000 sample records)
|
154
|
+
banko-ai run
|
155
|
+
|
156
|
+
# Start with custom data amount
|
157
|
+
banko-ai run --generate-data 10000
|
158
|
+
|
159
|
+
# Start without generating data
|
160
|
+
banko-ai run --no-data
|
161
|
+
|
162
|
+
# Start with debug mode
|
163
|
+
banko-ai run --debug
|
164
|
+
```
|
165
|
+
|
166
|
+

|
167
|
+
|
168
|
+
## 🎯 What Happens on Startup
|
169
|
+
|
170
|
+
1. **Database Connection**: Connects to CockroachDB and creates necessary tables
|
171
|
+
2. **Table Creation**: Creates `expenses` table with vector indexes and cache tables
|
172
|
+
3. **Data Generation**: Automatically generates 5000 sample expense records with enriched descriptions
|
173
|
+
4. **AI Provider Setup**: Initializes the selected AI provider and loads available models
|
174
|
+
5. **Web Server**: Starts the Flask application on http://localhost:5000
|
175
|
+
|
176
|
+
## 📊 Sample Data Features
|
177
|
+
|
178
|
+
The generated sample data includes:
|
179
|
+
|
180
|
+
- **Rich Descriptions**: "Bought food delivery at McDonald's for $56.68 fast significant purchase restaurant and service paid with debit card this month"
|
181
|
+
- **Merchant Information**: Realistic merchant names and categories
|
182
|
+
- **Amount Context**: Expense amounts with contextual descriptions
|
183
|
+
- **Temporal Context**: Recent, this week, this month, etc.
|
184
|
+
- **Payment Methods**: Bank Transfer, Debit Card, Credit Card, Cash, Check
|
185
|
+
- **User-Specific Data**: Multiple user IDs for testing user-specific search
|
186
|
+
|
187
|
+

|
188
|
+
|
189
|
+
## 🌐 Web Interface
|
190
|
+
|
191
|
+
Access the application at http://localhost:5000
|
192
|
+
|
193
|
+
### Main Features
|
194
|
+
|
195
|
+
- **🏠 Home**: Overview dashboard with expense statistics
|
196
|
+
- **💬 Chat**: AI-powered expense analysis and Q&A
|
197
|
+
- **🔍 Search**: Vector-based expense search
|
198
|
+
- **⚙️ Settings**: AI provider and model configuration
|
199
|
+
- **📊 Analytics**: Detailed expense analysis and insights
|
200
|
+
|
201
|
+

|
202
|
+
|
203
|
+
## 🔧 CLI Commands
|
204
|
+
|
205
|
+
```bash
|
206
|
+
# Run the application
|
207
|
+
banko-ai run [OPTIONS]
|
208
|
+
|
209
|
+
# Generate sample data
|
210
|
+
banko-ai generate-data --count 2000
|
211
|
+
|
212
|
+
# Clear all data
|
213
|
+
banko-ai clear-data
|
214
|
+
|
215
|
+
# Check application status
|
216
|
+
banko-ai status
|
217
|
+
|
218
|
+
# Search expenses
|
219
|
+
banko-ai search "food delivery" --limit 10
|
220
|
+
|
221
|
+
# Show help
|
222
|
+
banko-ai help
|
223
|
+
```
|
224
|
+
|
225
|
+
## 🔌 API Endpoints
|
226
|
+
|
227
|
+
| Endpoint | Method | Description |
|
228
|
+
|----------|--------|-------------|
|
229
|
+
| `/` | GET | Web interface |
|
230
|
+
| `/api/health` | GET | System health check |
|
231
|
+
| `/api/ai-providers` | GET | Available AI providers |
|
232
|
+
| `/api/models` | GET | Available models for current provider |
|
233
|
+
| `/api/search` | POST | Vector search expenses |
|
234
|
+
| `/api/rag` | POST | RAG-based Q&A |
|
235
|
+
|
236
|
+
### API Examples
|
237
|
+
|
238
|
+
```bash
|
239
|
+
# Health check
|
240
|
+
curl http://localhost:5000/api/health
|
241
|
+
|
242
|
+
# Search expenses
|
243
|
+
curl -X POST http://localhost:5000/api/search \
|
244
|
+
-H "Content-Type: application/json" \
|
245
|
+
-d '{"query": "food delivery", "limit": 5}'
|
246
|
+
|
247
|
+
# RAG query
|
248
|
+
curl -X POST http://localhost:5000/api/rag \
|
249
|
+
-H "Content-Type: application/json" \
|
250
|
+
-d '{"query": "What are my biggest expenses this month?", "limit": 5}'
|
251
|
+
```
|
252
|
+
|
253
|
+
## 🏗️ Architecture
|
254
|
+
|
255
|
+
### Database Schema
|
256
|
+
|
257
|
+
- **expenses**: Main expense table with vector embeddings
|
258
|
+
- **query_cache**: Cached search results
|
259
|
+
- **embedding_cache**: Cached embeddings
|
260
|
+
- **insights_cache**: Cached AI insights
|
261
|
+
- **vector_search_cache**: Cached vector search results
|
262
|
+
- **cache_stats**: Cache performance statistics
|
263
|
+
|
264
|
+
### Vector Indexes
|
265
|
+
|
266
|
+
```sql
|
267
|
+
-- User-specific vector index for personalized search
|
268
|
+
CREATE INDEX idx_expenses_user_embedding ON expenses
|
269
|
+
USING cspann (user_id, embedding vector_l2_ops);
|
270
|
+
|
271
|
+
-- General vector index for global search
|
272
|
+
CREATE INDEX idx_expenses_embedding ON expenses
|
273
|
+
USING cspann (embedding vector_l2_ops);
|
274
|
+
|
275
|
+
-- Note: Regional partitioning syntax may vary by CockroachDB version
|
276
|
+
-- CREATE INDEX idx_expenses_regional ON expenses
|
277
|
+
-- USING cspann (user_id, embedding vector_l2_ops)
|
278
|
+
-- LOCALITY REGIONAL BY ROW AS region;
|
279
|
+
```
|
280
|
+
|
281
|
+
**Benefits:**
|
282
|
+
- **User-specific queries**: Faster search within user's data
|
283
|
+
- **Contextual results**: Enhanced merchant and amount information
|
284
|
+
- **Scalable performance**: Optimized for large datasets
|
285
|
+
- **Multi-tenant support**: Isolated user data with shared infrastructure
|
286
|
+
|
287
|
+

|
288
|
+
|
289
|
+
## 🔄 AI Provider Switching
|
290
|
+
|
291
|
+
Switch between AI providers and models dynamically:
|
292
|
+
|
293
|
+
1. Go to **Settings** in the web interface
|
294
|
+
2. Select your preferred AI provider
|
295
|
+
3. Choose from available models
|
296
|
+
4. Changes take effect immediately
|
297
|
+
|
298
|
+
### Supported Providers
|
299
|
+
|
300
|
+
- **OpenAI**: GPT-3.5, GPT-4, GPT-4 Turbo
|
301
|
+
- **AWS Bedrock**: Claude 3 Sonnet, Claude 3 Haiku, Llama 2
|
302
|
+
- **IBM Watsonx**: Granite models, Llama 2, Mistral
|
303
|
+
- **Google Gemini**: Gemini 1.5 Pro, Gemini 1.5 Flash
|
304
|
+
|
305
|
+

|
306
|
+
|
307
|
+
## 📈 Performance Features
|
308
|
+
|
309
|
+
### Caching System
|
310
|
+
|
311
|
+
- **Query Caching**: Caches search results for faster responses
|
312
|
+
- **Embedding Caching**: Caches vector embeddings to avoid recomputation
|
313
|
+
- **Insights Caching**: Caches AI-generated insights
|
314
|
+
- **Multi-layer Optimization**: Intelligent cache invalidation and refresh
|
315
|
+
|
316
|
+
### Vector Search Optimization
|
317
|
+
|
318
|
+
- **User-Specific Indexes**: Faster search for individual users
|
319
|
+
- **Regional Partitioning**: Optimized for multi-region deployments
|
320
|
+
- **Data Enrichment**: Enhanced descriptions improve search accuracy
|
321
|
+
- **Batch Processing**: Efficient data loading and processing
|
322
|
+
|
323
|
+
### Advanced Vector Features
|
324
|
+
|
325
|
+
For detailed demonstrations of vector indexing and search capabilities:
|
326
|
+
|
327
|
+
📖 **[Vector Index Demo Guide](docs/VECTOR_INDEX_DEMO_GUIDE.md)** - Comprehensive guide covering:
|
328
|
+
- User-specific vector indexing
|
329
|
+
- Regional partitioning with multi-region CockroachDB
|
330
|
+
- Performance benchmarking
|
331
|
+
- Advanced search queries
|
332
|
+
- RAG with user context
|
333
|
+
- Troubleshooting and best practices
|
334
|
+
|
335
|
+

|
336
|
+
|
337
|
+
## 🛠️ Development
|
338
|
+
|
339
|
+
### Project Structure
|
340
|
+
|
341
|
+
```
|
342
|
+
banko_ai/
|
343
|
+
├── ai_providers/ # AI provider implementations
|
344
|
+
├── config/ # Configuration management
|
345
|
+
├── static/ # Web assets and images
|
346
|
+
├── templates/ # HTML templates
|
347
|
+
├── utils/ # Database and cache utilities
|
348
|
+
├── vector_search/ # Vector search and data generation
|
349
|
+
└── web/ # Flask web application
|
350
|
+
```
|
351
|
+
|
352
|
+
### Adding New AI Providers
|
353
|
+
|
354
|
+
1. Create a new provider class in `ai_providers/`
|
355
|
+
2. Extend the `BaseAIProvider` class
|
356
|
+
3. Implement required methods
|
357
|
+
4. Add to the factory in `ai_providers/factory.py`
|
358
|
+
|
359
|
+
## 🐛 Troubleshooting
|
360
|
+
|
361
|
+
### Common Issues
|
362
|
+
|
363
|
+
**Database Connection Error**
|
364
|
+
```bash
|
365
|
+
# Check CockroachDB is running
|
366
|
+
cockroach start --insecure --listen-addr=localhost:26257
|
367
|
+
|
368
|
+
# Verify database exists
|
369
|
+
cockroach sql --url="postgresql://root@localhost:26257/banko_ai?sslmode=disable" --execute "SHOW TABLES;"
|
370
|
+
```
|
371
|
+
|
372
|
+
**AI Provider Disconnected**
|
373
|
+
- Verify API keys are set correctly
|
374
|
+
- Check network connectivity
|
375
|
+
- Ensure the selected model is available
|
376
|
+
|
377
|
+
**No Search Results**
|
378
|
+
- Ensure sample data is loaded: `banko-ai generate-data --count 1000`
|
379
|
+
- Check vector indexes are created
|
380
|
+
- Verify search query format
|
381
|
+
|
382
|
+
### Debug Mode
|
383
|
+
|
384
|
+
```bash
|
385
|
+
# Run with debug logging
|
386
|
+
banko-ai run --debug
|
387
|
+
|
388
|
+
# Check application status
|
389
|
+
banko-ai status
|
390
|
+
```
|
391
|
+
|
392
|
+
## 📝 License
|
393
|
+
|
394
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
395
|
+
|
396
|
+
## 🤝 Contributing
|
397
|
+
|
398
|
+
1. Fork the repository
|
399
|
+
2. Create a feature branch
|
400
|
+
3. Make your changes
|
401
|
+
4. Add tests if applicable
|
402
|
+
5. Submit a pull request
|
403
|
+
|
404
|
+
## 📞 Support
|
405
|
+
|
406
|
+
For issues and questions:
|
407
|
+
- Check the [troubleshooting section](#-troubleshooting)
|
408
|
+
- Review the [API documentation](#-api-endpoints)
|
409
|
+
- See the [Vector Index Demo Guide](docs/VECTOR_INDEX_DEMO_GUIDE.md) for advanced features
|
410
|
+
- Open an issue on GitHub
|
411
|
+
|
412
|
+
---
|
413
|
+
|
414
|
+
**Built with ❤️ using CockroachDB, Flask, and modern AI technologies**
|
@@ -0,0 +1,46 @@
|
|
1
|
+
banko_ai/__init__.py,sha256=G1InyKemqQxP9xx6yGZgolBmrmOLSpBXqGYY8LaFOeo,568
|
2
|
+
banko_ai/__main__.py,sha256=vySUZt0uAzogVu6yURIlLJ1Ig5bdxT_55oiiaiZKqA8,185
|
3
|
+
banko_ai/cli.py,sha256=LgnGaUqsbtrymOru1IJsgTW98rN3zoq6UGKkbR8ojs8,13732
|
4
|
+
banko_ai/ai_providers/__init__.py,sha256=JdBgw5Mji2pe9nU-aiRYUmJuZk0q8KbcMtbpMJC5Dq8,483
|
5
|
+
banko_ai/ai_providers/aws_provider.py,sha256=-tR-8tlEeSL-Fspx05tTMFguvQylkW_pz0PI2XJEByM,13074
|
6
|
+
banko_ai/ai_providers/base.py,sha256=zbuAgkHIfJ0YkG83LXzieJuvXBcB2-nx7NhbL-I4Pf0,4725
|
7
|
+
banko_ai/ai_providers/factory.py,sha256=Bqq9HcbyTfPvaOTxsHSM9eSvkB71cJoq21cMmXo4LLc,2885
|
8
|
+
banko_ai/ai_providers/gemini_provider.py,sha256=KqzHLLl7EYnai9-zFenRmktVk0zOA8AtsYScQZIcdLU,13044
|
9
|
+
banko_ai/ai_providers/openai_provider.py,sha256=Myu2And6kTD2EgIVcWHGak5fDIq0pu1HQzf-jj72y3k,11657
|
10
|
+
banko_ai/ai_providers/watsonx_provider.py,sha256=4rLg4GmEpM7w4bCaJWnAOIprx7olHtg2zZ3o9RDkxzM,29422
|
11
|
+
banko_ai/config/__init__.py,sha256=YObKfKjjW89kSfARiTzXnGuSPz1C92aSMKgmO3BtQb8,133
|
12
|
+
banko_ai/config/settings.py,sha256=_9LoMVLNx_BoHK1tFU0tFNBpco1VGOYjTChghdzNQ9Y,8437
|
13
|
+
banko_ai/static/Anallytics.png,sha256=fWLddd5hlB4YEUYSIzOFVNnTny6D8VExQeVn31mywTc,80242
|
14
|
+
banko_ai/static/Graph.png,sha256=eOPCPBUAs6KGeIWbDk9aDt_pJYRxBCzm4dkYQ7xdj4g,58591
|
15
|
+
banko_ai/static/Graph2.png,sha256=nVj9Qdu5hvBI3AoWAMnL7WJb-T22aaBX3ATVsDXTM2I,32462
|
16
|
+
banko_ai/static/ai-status.png,sha256=Kkb97Y8xnI8U_gtvEsMdvq_jU7AKo5l2bAbN64cfLvU,192414
|
17
|
+
banko_ai/static/banko-ai-assistant-watsonx.gif,sha256=2tksL9Hk1bqOZii_BgrPKn0VOqNi06uW3vF9myNLDf4,1855004
|
18
|
+
banko_ai/static/banko-db-ops.png,sha256=nqKDT4wHyaL20RhwIRHtolymjWxItc60qNkT1m7rpPg,1110930
|
19
|
+
banko_ai/static/banko-response.png,sha256=7ErujLBHpjLfaPxWzq8GPo0d0sXO9lLVN2Rd10QbXG0,949523
|
20
|
+
banko_ai/static/cache-stats.png,sha256=Iu87afk-OHb2UsqkQHnk1HkQBkmUGodnkEdl5sOfR0I,212338
|
21
|
+
banko_ai/static/creditcard.png,sha256=w5Er9_FqwhrJyJil7ZGVNM2RKgLxnuDiSBG-2VLEipw,205098
|
22
|
+
banko_ai/static/profilepic.jpeg,sha256=0YVHhCtC6uasGHk1QKy-am3vg-r0o_40GCXtHEDcUPA,847664
|
23
|
+
banko_ai/static/query_watcher.png,sha256=wkVFsgE0NPQASlk-rGsyPDeFIzaxoYHfadsmpgsLuIE,695070
|
24
|
+
banko_ai/static/roach-logo.svg,sha256=Rxv3iBLIHQ5FXsAj81q8FRbleeJ-ImkfC3gh__z1eRQ,89580
|
25
|
+
banko_ai/static/watsonx-icon.svg,sha256=eDkBLIs6Cau6z99OKdkkSMP1PKPkKLTCPLBftTvaaTw,2768
|
26
|
+
banko_ai/templates/base.html,sha256=s8Dfa0Eg9Lze6zeruVSbXcLJtv-Vo7KhKvk4M3HIhxM,2237
|
27
|
+
banko_ai/templates/dashboard.html,sha256=HxsA6xrJphivduAId_GnTBTJSdEP3p6buV13Ak7i9a0,27534
|
28
|
+
banko_ai/templates/index.html,sha256=Tq56E2QapzPF8BNKxUPP-9kqi1O9NZnyHSGY4QFLyOo,66805
|
29
|
+
banko_ai/templates/login.html,sha256=YPMtJcvCzFlknwmUrG7VskeM691J4msAjZw-t4CcPn4,2063
|
30
|
+
banko_ai/utils/__init__.py,sha256=0n1JYzZUWwgwOzV82I6OnmfUV_TOnal1V0DoEb0E2Cs,225
|
31
|
+
banko_ai/utils/cache_manager.py,sha256=EK_hRNKjMbrzlHGP3M1fO_71H0NdAobY_S9dzE4_-xI,22384
|
32
|
+
banko_ai/utils/database.py,sha256=sJYAFTApkWReEJuMbbBDiz7XfgiiEd6lPSSyF6BQDpk,7754
|
33
|
+
banko_ai/utils/migration.py,sha256=j1lYUVZyYMcMvxZUOFymoK19QTPqkDZFXD-iysVCnQo,4764
|
34
|
+
banko_ai/vector_search/__init__.py,sha256=vYksnkUU4FA8XBNzYZIH4FoGjXCx9oIbrDeapSzrNuE,621
|
35
|
+
banko_ai/vector_search/enrichment.py,sha256=sRnFLNG9WGfq8j44T7krxHI-Lc2RSH68mt0IT0GTHBA,10203
|
36
|
+
banko_ai/vector_search/generator.py,sha256=b2yFIZRVkeGXOvsQmrqvLG7EygQ5RS4c6EakeYCZeMM,13439
|
37
|
+
banko_ai/vector_search/search.py,sha256=k3wo3zFJH9o-kBc-vAS-bdmM3LGX2vIk3u4cRA5QPXo,16915
|
38
|
+
banko_ai/web/__init__.py,sha256=hjWVVxYpIZhOAN1qBf4xTd36a5AUHM03Q8BF8pykhJQ,363
|
39
|
+
banko_ai/web/app.py,sha256=XZI_IyWm6FtVMBoFVVMyUi_sdT4kAOXjrfcR4G-eAK8,25757
|
40
|
+
banko_ai/web/auth.py,sha256=js6qIixSFHyLbETDm8GNLCPrDkCDcaQZPFOrqtZP1uw,2125
|
41
|
+
banko_ai_assistant-1.0.0.dist-info/licenses/LICENSE,sha256=skG0LkywIClj8fgSIXiG6o9vUDJ678BKBObIyJ19OMw,1075
|
42
|
+
banko_ai_assistant-1.0.0.dist-info/METADATA,sha256=WL4et-vBZP_IGw57SeJVcZz1P5DEL7cHQZUsC4MwveU,13193
|
43
|
+
banko_ai_assistant-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
44
|
+
banko_ai_assistant-1.0.0.dist-info/entry_points.txt,sha256=IxPjBjMvbpCp-ikCA43bOSbYboTGPX4HYcZlvu2_vcA,47
|
45
|
+
banko_ai_assistant-1.0.0.dist-info/top_level.txt,sha256=xNMa9Z67UssefOQ2ubFObtqUYIfYmCIclfz0xdo5OPE,9
|
46
|
+
banko_ai_assistant-1.0.0.dist-info/RECORD,,
|
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 Banko AI Assistant
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -0,0 +1 @@
|
|
1
|
+
banko_ai
|