syntaxmatrix 2.6.4.4__py3-none-any.whl → 3.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.
- syntaxmatrix/__init__.py +6 -4
- syntaxmatrix/agentic/agents.py +195 -15
- syntaxmatrix/agentic/agents_orchestrer.py +16 -10
- syntaxmatrix/client_docs.py +237 -0
- syntaxmatrix/commentary.py +96 -25
- syntaxmatrix/core.py +142 -56
- syntaxmatrix/dataset_preprocessing.py +2 -2
- syntaxmatrix/db.py +0 -17
- syntaxmatrix/kernel_manager.py +174 -150
- syntaxmatrix/page_builder_generation.py +654 -50
- syntaxmatrix/page_layout_contract.py +25 -3
- syntaxmatrix/page_patch_publish.py +368 -15
- syntaxmatrix/plugins/__init__.py +0 -0
- syntaxmatrix/premium/__init__.py +10 -2
- syntaxmatrix/premium/catalogue/__init__.py +121 -0
- syntaxmatrix/premium/gate.py +15 -3
- syntaxmatrix/premium/state.py +507 -0
- syntaxmatrix/premium/verify.py +222 -0
- syntaxmatrix/profiles.py +1 -1
- syntaxmatrix/routes.py +9782 -8004
- syntaxmatrix/settings/model_map.py +50 -65
- syntaxmatrix/settings/prompts.py +1435 -380
- syntaxmatrix/settings/string_navbar.py +4 -4
- syntaxmatrix/static/icons/bot_icon.png +0 -0
- syntaxmatrix/static/icons/bot_icon2.png +0 -0
- syntaxmatrix/templates/admin_billing.html +408 -0
- syntaxmatrix/templates/admin_branding.html +65 -2
- syntaxmatrix/templates/admin_features.html +54 -0
- syntaxmatrix/templates/dashboard.html +285 -8
- syntaxmatrix/templates/edit_page.html +199 -18
- syntaxmatrix/themes.py +17 -17
- syntaxmatrix/workspace_db.py +0 -23
- syntaxmatrix-3.0.0.dist-info/METADATA +219 -0
- {syntaxmatrix-2.6.4.4.dist-info → syntaxmatrix-3.0.0.dist-info}/RECORD +38 -33
- {syntaxmatrix-2.6.4.4.dist-info → syntaxmatrix-3.0.0.dist-info}/WHEEL +1 -1
- syntaxmatrix/settings/default.yaml +0 -13
- syntaxmatrix-2.6.4.4.dist-info/METADATA +0 -539
- syntaxmatrix-2.6.4.4.dist-info/licenses/LICENSE.txt +0 -21
- /syntaxmatrix/{plugin_manager.py → plugins/plugin_manager.py} +0 -0
- /syntaxmatrix/static/icons/{logo3.png → logo2.png} +0 -0
- {syntaxmatrix-2.6.4.4.dist-info → syntaxmatrix-3.0.0.dist-info}/top_level.txt +0 -0
|
@@ -1,539 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: syntaxmatrix
|
|
3
|
-
Version: 2.6.4.4
|
|
4
|
-
Summary: SyntaxMUI: A customizable framework for Python AI Assistant Projects.
|
|
5
|
-
Author: Bob Nti
|
|
6
|
-
Author-email: bob.nti@syntaxmatrix.net
|
|
7
|
-
License: MIT
|
|
8
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
9
|
-
Classifier: Operating System :: OS Independent
|
|
10
|
-
Requires-Python: >=3.9
|
|
11
|
-
Description-Content-Type: text/markdown
|
|
12
|
-
License-File: LICENSE.txt
|
|
13
|
-
Requires-Dist: Flask>=3.0.3
|
|
14
|
-
Requires-Dist: requests>=2.32.3
|
|
15
|
-
Requires-Dist: pytz<2026,>=2025.2
|
|
16
|
-
Requires-Dist: pywin32>=311; sys_platform == "win32"
|
|
17
|
-
Requires-Dist: Markdown>=3.7
|
|
18
|
-
Requires-Dist: pypdf>=5.4.0
|
|
19
|
-
Requires-Dist: PyPDF2==3.0.1
|
|
20
|
-
Requires-Dist: nest-asyncio>=1.6.0
|
|
21
|
-
Requires-Dist: python-dotenv>=1.1.0
|
|
22
|
-
Requires-Dist: openai>=1.84.0
|
|
23
|
-
Requires-Dist: google-genai>=1.19.0
|
|
24
|
-
Requires-Dist: anthropic>=0.67.0
|
|
25
|
-
Requires-Dist: reportlab>=4.4.3
|
|
26
|
-
Requires-Dist: lxml>=6.0.2
|
|
27
|
-
Requires-Dist: flask-login>=0.6.3
|
|
28
|
-
Requires-Dist: pandas>=2.2.3
|
|
29
|
-
Requires-Dist: numpy>=2.0.2
|
|
30
|
-
Requires-Dist: matplotlib>=3.9.4
|
|
31
|
-
Requires-Dist: plotly>=6.3.0
|
|
32
|
-
Requires-Dist: seaborn>=0.13.2
|
|
33
|
-
Requires-Dist: scikit-learn>=1.6.1
|
|
34
|
-
Requires-Dist: jupyter_client>=8.6.3
|
|
35
|
-
Requires-Dist: ipykernel>=6.29.5
|
|
36
|
-
Requires-Dist: ipython
|
|
37
|
-
Requires-Dist: statsmodels
|
|
38
|
-
Requires-Dist: sqlalchemy>=2.0.42
|
|
39
|
-
Requires-Dist: cryptography>=45.0.6
|
|
40
|
-
Requires-Dist: regex>=2025.11.3
|
|
41
|
-
Requires-Dist: tiktoken>=0.12.0
|
|
42
|
-
Requires-Dist: xgboost>=2.1.4
|
|
43
|
-
Requires-Dist: beautifulsoup4>=4.12.2
|
|
44
|
-
Requires-Dist: html5lib>=1.1
|
|
45
|
-
Requires-Dist: shap>=0.42.0
|
|
46
|
-
Dynamic: author
|
|
47
|
-
Dynamic: author-email
|
|
48
|
-
Dynamic: classifier
|
|
49
|
-
Dynamic: description
|
|
50
|
-
Dynamic: description-content-type
|
|
51
|
-
Dynamic: license
|
|
52
|
-
Dynamic: license-file
|
|
53
|
-
Dynamic: requires-dist
|
|
54
|
-
Dynamic: requires-python
|
|
55
|
-
Dynamic: summary
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
# SyntaxMatrix: Full-Stack Plug-and-Play AI Assistant Micro-Framework
|
|
59
|
-
|
|
60
|
-
<!-- LOGO PLACEHOLDER -->
|
|
61
|
-
<p align="center">
|
|
62
|
-
<img src="logo.png" alt="SyntaxMatrix Logo" width="150"/><br>
|
|
63
|
-
<em>Add your project logo above. Recommended size: 150x150px.</em>
|
|
64
|
-
</p>
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## Introduction
|
|
69
|
-
|
|
70
|
-
**SyntaxMatrix** is a full-stack, plug-and-play micro-framework that enables AI developers, educators, researchers, and enterprise teams to build, deploy, and manage advanced AI assistant applications with minimal friction.
|
|
71
|
-
|
|
72
|
-
Designed to abstract away heavy infrastructure and data engineering, SyntaxMatrix allows you to focus on your project logic—while providing powerful out-of-the-box features like persistent page/content management, built-in Retrieval-Augmented Generation (RAG) capabilities, vector search, analytics dashboard, and more.
|
|
73
|
-
|
|
74
|
-
SyntaxMatrix is:
|
|
75
|
-
- **Modular and extensible**: Use it as a drop-in UI and logic layer in any Python-based AI app.
|
|
76
|
-
- **Enterprise-ready**: Supports multi-user admin panel, dataset upload, in-memory and persistent vector search, and fine-grained CRUD controls.
|
|
77
|
-
- **DevOps-friendly**: Easily deploy on **GCP, Docker, Gunicorn**, or your own local server.
|
|
78
|
-
- **Zero-boilerplate for analysts**: Upload your data and immediately ask questions or request ML analytics—no code changes required.
|
|
79
|
-
- **Open to rapid prototyping**: Perfect for demo projects, classroom tools, and production-grade LLM-powered assistants.
|
|
80
|
-
|
|
81
|
-
**Core Use Cases:**
|
|
82
|
-
- Build custom AI chat assistants with advanced RAG capabilities
|
|
83
|
-
- Deploy internal knowledge tools for your company, with domain PDF/document search out of the box
|
|
84
|
-
- Enable analysts to upload datasets and perform instant ML and data analytics
|
|
85
|
-
- Teach students or teams how to leverage LLMs, vector databases, and prompt engineering
|
|
86
|
-
- Prototype or productionize multi-agent chat, classroom kits, or custom analytics dashboards
|
|
87
|
-
|
|
88
|
-
**Audience:**
|
|
89
|
-
AI developers, educators, ML/DS researchers, enterprise engineering teams, and anyone who needs a powerful, extensible, and easy-to-integrate AI assistant platform.
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
### At a Glance
|
|
94
|
-
|
|
95
|
-
- **Plug-and-play installation:**
|
|
96
|
-
```bash
|
|
97
|
-
pip install syntaxmatrix
|
|
98
|
-
# For analytics, ML, and advanced dashboard features:
|
|
99
|
-
pip install "syntaxmatrix[analysis]"
|
|
100
|
-
```
|
|
101
|
-
- **Full-stack:**
|
|
102
|
-
Built-in UI, backend, vector storage, admin panel, and analytics dashboard
|
|
103
|
-
- **Seamless document & data ingestion:**
|
|
104
|
-
Persist company/domain PDFs, upload user files for per-session RAG, manage and search both
|
|
105
|
-
- **Ready-to-use admin & dashboard:**
|
|
106
|
-
No setup required for CRUD, uploads, analytics, or page management
|
|
107
|
-
- **Developer friendly:**
|
|
108
|
-
Extend with your own widgets, handlers, and ML logic as needed
|
|
109
|
-
- **Deploy anywhere:**
|
|
110
|
-
GCP, Docker, Gunicorn, or local
|
|
111
|
-
- **Future-ready:**
|
|
112
|
-
Multi-agent chat, classroom-ready kits, and streaming responses on the roadmap
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## 2. SyntaxMatrix UI Overview
|
|
117
|
-
|
|
118
|
-
Below are the primary interfaces included out-of-the-box with SyntaxMatrix.
|
|
119
|
-
**Replace the image files with your own in the README repo once available.**
|
|
120
|
-
|
|
121
|
-
### Main Chat Page
|
|
122
|
-
|
|
123
|
-

|
|
124
|
-
*Hint: This screenshot should showcase the default landing/chat interface: user input box, chat history, and file uploader (PDF). Show a few example queries, a PDF upload, and both bot/user chat bubbles.*
|
|
125
|
-
|
|
126
|
-
### Admin Panel
|
|
127
|
-
|
|
128
|
-

|
|
129
|
-
*Hint: Show the admin interface with options for creating/editing pages, uploading company/domain documents, and performing CRUD operations. Demonstrate file upload for company vectors (PDFs), editing page titles/content, and managing company data.*
|
|
130
|
-
|
|
131
|
-
### Analytics Dashboard
|
|
132
|
-
|
|
133
|
-

|
|
134
|
-
*Hint: Capture the dashboard after uploading a dataset and running a sample ML/analytics task. Show an analytics summary, generated plots, and a chat interaction where smxAI responds with insights about the data.*
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
## 3. Installation & Setup
|
|
139
|
-
|
|
140
|
-
**SyntaxMatrix** is distributed via PyPI and can be added to any Python project in seconds.
|
|
141
|
-
|
|
142
|
-
```bash
|
|
143
|
-
pip install syntaxmatrix
|
|
144
|
-
# For analytics, ML, and advanced dashboard features:
|
|
145
|
-
pip install "syntaxmatrix[analysis]"
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
> **Copy button available in the top right of every code block on GitHub for one-click copy.
|
|
149
|
-
|
|
150
|
-
### Python & System Requirements
|
|
151
|
-
|
|
152
|
-
- **Python 3.8+**
|
|
153
|
-
- pip (latest recommended)
|
|
154
|
-
|
|
155
|
-
All dependencies are installed automatically, including Flask, pandas, scikit-learn, numpy, openai, matplotlib, plotly, PyPDF2, and more.
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
## 4. Getting Started: Add SyntaxMatrix to Your Project
|
|
160
|
-
|
|
161
|
-
SyntaxMatrix is designed to be **plug-and-play**.
|
|
162
|
-
**You do not need to copy any demo files.**
|
|
163
|
-
Instead, follow these steps to add a full chat UI, RAG, and dashboard to your app:
|
|
164
|
-
|
|
165
|
-
### A. Minimal Chat Assistant Integration
|
|
166
|
-
|
|
167
|
-
Below is a minimal example for developers.
|
|
168
|
-
This creates a chat interface that supports:
|
|
169
|
-
|
|
170
|
-
- User queries and chat history
|
|
171
|
-
- Company or domain PDF ingestion/search (auto-managed)
|
|
172
|
-
- Per-session document (user) upload and retrieval via in-memory vectorstore (SMIV)
|
|
173
|
-
- Streamed LLM responses
|
|
174
|
-
- CRUD for pages and admin management—all via built-in UI
|
|
175
|
-
|
|
176
|
-
```python
|
|
177
|
-
import syntaxmatrix as smx
|
|
178
|
-
from syntaxmatrix.smiv import SMIV
|
|
179
|
-
from syntaxmatrix.vectorizer import embed_text
|
|
180
|
-
|
|
181
|
-
def get_or_build_smiv_index(sid):
|
|
182
|
-
# User session in-memory vector index (SMIV) for uploaded PDFs
|
|
183
|
-
chunks = smx.get_user_chunks(sid) or []
|
|
184
|
-
count = len(chunks)
|
|
185
|
-
if (sid not in smx._user_indices or smx._user_index_counts.get(sid, -1) != count):
|
|
186
|
-
vecs = [embed_text(txt) for txt in chunks]
|
|
187
|
-
idx = SMIV(len(vecs[0]) if vecs else 1536)
|
|
188
|
-
for i, (txt, vec) in enumerate(zip(chunks, vecs)):
|
|
189
|
-
idx.add(vector=vec, metadata={"chunk_text": txt, "chunk_index": i, "session_id": sid})
|
|
190
|
-
smx._user_indices[sid] = idx
|
|
191
|
-
smx._user_index_counts[sid] = count
|
|
192
|
-
return smx._user_indices[sid]
|
|
193
|
-
|
|
194
|
-
def create_conversation(stream=False):
|
|
195
|
-
chat_history = smx.get_chat_history()
|
|
196
|
-
sid = smx.get_session_id()
|
|
197
|
-
sources = []
|
|
198
|
-
|
|
199
|
-
# Ensure session indices exist
|
|
200
|
-
if not hasattr(smx, "_user_indices"):
|
|
201
|
-
smx._user_indices = {}
|
|
202
|
-
smx._user_index_counts = {}
|
|
203
|
-
|
|
204
|
-
smiv_index = get_or_build_smiv_index(sid)
|
|
205
|
-
query, intent = smx.get_text_input_value("user_query")
|
|
206
|
-
query = query.strip()
|
|
207
|
-
if not query:
|
|
208
|
-
return
|
|
209
|
-
|
|
210
|
-
if intent == "none":
|
|
211
|
-
context = ""
|
|
212
|
-
else:
|
|
213
|
-
lines = []
|
|
214
|
-
q_vec = embed_text(query)
|
|
215
|
-
if intent in ("user_docs", "both"):
|
|
216
|
-
user_hits = smiv_index.search(q_vec, top_k=3)
|
|
217
|
-
lines.append("\n### Personal Context (user uploads)\n")
|
|
218
|
-
for hit in user_hits:
|
|
219
|
-
text = hit["metadata"]["chunk_text"].strip().replace("\n", " ")
|
|
220
|
-
lines.append(f"- {text}\n")
|
|
221
|
-
sources.append("User uploads")
|
|
222
|
-
if intent in ("system_docs", "both"):
|
|
223
|
-
sys_hits = smx.smpv_search(q_vec, top_k=5)
|
|
224
|
-
lines.append("### System Context (company docs)\n")
|
|
225
|
-
for hit in sys_hits:
|
|
226
|
-
text = hit["chunk_text"].strip().replace("\n", " ")
|
|
227
|
-
lines.append(f"- {text}\n")
|
|
228
|
-
sources.append("Company/domain docs")
|
|
229
|
-
context = "".join(lines)
|
|
230
|
-
|
|
231
|
-
conversations = "\n".join([f"{role}: {msg}" for role, msg in chat_history])
|
|
232
|
-
# [Replace with your actual LLM call here]
|
|
233
|
-
answer = smx.process_query(query, conversations, context, stream=stream).strip()
|
|
234
|
-
|
|
235
|
-
if sources:
|
|
236
|
-
answer += "<ul style='margin-top:5px;'><strong style='color:blue;font-size:0.7rem;'>Sources: "
|
|
237
|
-
for s in sources:
|
|
238
|
-
answer += f"<li>{s}</li>"
|
|
239
|
-
answer += "</strong></ul>"
|
|
240
|
-
|
|
241
|
-
chat_history.append(("User", query))
|
|
242
|
-
chat_history.append(("Bot", answer))
|
|
243
|
-
smx.set_chat_history(chat_history)
|
|
244
|
-
smx.clear_text_input_value("user_query")
|
|
245
|
-
|
|
246
|
-
# --- Register widgets for chat UI
|
|
247
|
-
smx.text_input("user_query", "Enter query:", placeholder="Ask smxAI anything...")
|
|
248
|
-
smx.button("submit_query", "Submit", callback=lambda: create_conversation(stream=True))
|
|
249
|
-
smx.file_uploader("user_files", "Upload PDF files:", accept_multiple_files=True)
|
|
250
|
-
|
|
251
|
-
# Optional: Clear chat
|
|
252
|
-
def clear_chat():
|
|
253
|
-
smx.clear_chat_history()
|
|
254
|
-
smx.button("clear", "Clear", clear_chat)
|
|
255
|
-
|
|
256
|
-
if __name__ == "__main__":
|
|
257
|
-
smx.run()
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
> **How it works:**
|
|
261
|
-
> - All uploaded PDFs (company/domain) via the Admin Panel are indexed and available to smxAI for search and retrieval—*automatically*.
|
|
262
|
-
> - User-uploaded PDFs are indexed *per session* in SMIV; these are ephemeral and cleared on session end.
|
|
263
|
-
> - The Admin Panel and page CRUD are built-in and accessible on startup.
|
|
264
|
-
|
|
265
|
-
---
|
|
266
|
-
|
|
267
|
-
### B. Enabling the Analytics Dashboard (Automated Data Analysis & ML)
|
|
268
|
-
|
|
269
|
-
The **Dashboard** is included out-of-the-box.
|
|
270
|
-
Once you run your SyntaxMatrix app, any admin or analyst can upload a CSV dataset via the dashboard and request instant analysis or ML jobs via natural language:
|
|
271
|
-
|
|
272
|
-
- **No extra code required for dashboard or ML.**
|
|
273
|
-
- All plots, distributions, and ML model training are performed *automatically* via the dashboard UI.
|
|
274
|
-
|
|
275
|
-
**Typical Workflow:**
|
|
276
|
-
1. Start your SyntaxMatrix-powered app.
|
|
277
|
-
2. Open the dashboard (via UI link).
|
|
278
|
-
3. Upload a CSV (e.g., `diabetes_dataset.csv`).
|
|
279
|
-
4. Use the chat box or dashboard buttons to request:
|
|
280
|
-
- Data summaries and descriptions
|
|
281
|
-
- Missing value detection/visualization
|
|
282
|
-
- Numeric/categorical feature analysis
|
|
283
|
-
- Correlation, heatmaps, boxplots, outlier detection
|
|
284
|
-
- Target distribution plots
|
|
285
|
-
- Feature-target comparison
|
|
286
|
-
- Automated ML: model training, evaluation, and result plotting
|
|
287
|
-
- Advanced: Clustering, UMAP visualizations, survival analysis (Kaplan-Meier, Cox model), and more
|
|
288
|
-
|
|
289
|
-
All outputs are returned as formatted tables, markdown, or interactive plots in the dashboard—**no code or Python needed**.
|
|
290
|
-
|
|
291
|
-
---
|
|
292
|
-
|
|
293
|
-
### C. (Optional) Custom Analytics / Extending Dashboard
|
|
294
|
-
|
|
295
|
-
You can extend the dashboard by adding your own widgets and ML jobs using `syntaxmatrix.plottings`.
|
|
296
|
-
|
|
297
|
-
**Example: Automated Model Training and Confusion Matrix (from analysis.py)**
|
|
298
|
-
|
|
299
|
-
```python
|
|
300
|
-
import syntaxmatrix as smx
|
|
301
|
-
import pandas as pd
|
|
302
|
-
from syntaxmatrix.plottings import figure
|
|
303
|
-
from sklearn.model_selection import train_test_split
|
|
304
|
-
from sklearn.linear_model import LogisticRegression
|
|
305
|
-
from sklearn.metrics import accuracy_score, confusion_matrix, ConfusionMatrixDisplay
|
|
306
|
-
|
|
307
|
-
def train_and_evaluate_model():
|
|
308
|
-
df = smx.get_uploaded_dataset()
|
|
309
|
-
X = df.drop("target_col", axis=1)
|
|
310
|
-
y = df["target_col"]
|
|
311
|
-
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.25)
|
|
312
|
-
model = LogisticRegression(max_iter=1000)
|
|
313
|
-
model.fit(X_train, y_train)
|
|
314
|
-
y_pred = model.predict(X_test)
|
|
315
|
-
acc = accuracy_score(y_test, y_pred)
|
|
316
|
-
cm = confusion_matrix(y_test, y_pred)
|
|
317
|
-
fig = figure(figsize=(4, 4))
|
|
318
|
-
disp = ConfusionMatrixDisplay(confusion_matrix=cm)
|
|
319
|
-
disp.plot(ax=fig.gca())
|
|
320
|
-
smx.set_plottings(fig, note=f"Accuracy: {acc:.3f}")
|
|
321
|
-
|
|
322
|
-
smx.button("train_model", "Train Model", callback=train_and_evaluate_model)
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
> **More advanced examples (pairplots, UMAP, survival analysis) can be found in the main documentation and your analysis.py.**
|
|
326
|
-
|
|
327
|
-
---
|
|
328
|
-
|
|
329
|
-
## 5. Core Features & Workflows
|
|
330
|
-
|
|
331
|
-
### A. Chat Interface & RAG (Retrieval-Augmented Generation) Flow
|
|
332
|
-
|
|
333
|
-
- **User queries** (chat box)
|
|
334
|
-
- **Intent detection** (which sources to use)
|
|
335
|
-
- **Semantic search** (company/domain + user PDFs)
|
|
336
|
-
- **LLM generation** (with optional source citation)
|
|
337
|
-
- **Built-in chat history**
|
|
338
|
-
|
|
339
|
-
See previous integration code for a full implementation.
|
|
340
|
-
|
|
341
|
-
---
|
|
342
|
-
|
|
343
|
-
### B. Admin Panel & Content Management
|
|
344
|
-
|
|
345
|
-
- **CRUD** for pages (About, Help, etc.)
|
|
346
|
-
- **Upload/manage PDFs** (domain knowledge)
|
|
347
|
-
- **Branding and theme** options
|
|
348
|
-
- **No extra code needed**—start app and access admin panel
|
|
349
|
-
|
|
350
|
-
---
|
|
351
|
-
|
|
352
|
-
### C. Vector Storage: Company/Domain vs. User Data
|
|
353
|
-
|
|
354
|
-
- **Company/domain vectors**: Persistent, in SQLite, available for RAG at all times
|
|
355
|
-
- **User (SMIV) vectors**: Ephemeral, per session, in-memory
|
|
356
|
-
- **Both managed automatically by SyntaxMatrix**
|
|
357
|
-
|
|
358
|
-
---
|
|
359
|
-
|
|
360
|
-
### D. Analytics Dashboard & Automated ML Jobs
|
|
361
|
-
|
|
362
|
-
- **Upload CSV** via dashboard
|
|
363
|
-
- **Auto analysis** (summary, missing values, distributions, correlations, boxplots, etc.)
|
|
364
|
-
- **Auto ML** (train/test split, logistic regression, confusion matrix, model accuracy)
|
|
365
|
-
- **Advanced analytics** (clustering, survival analysis, UMAP, plotly)
|
|
366
|
-
|
|
367
|
-
No Python required—just use the dashboard UI!
|
|
368
|
-
|
|
369
|
-
---
|
|
370
|
-
|
|
371
|
-
### E. SMIV (In-Memory Vectorstore) for User Docs
|
|
372
|
-
|
|
373
|
-
- **Session-based RAG** for user-uploaded PDFs
|
|
374
|
-
- **Auto chunking, embedding, search**
|
|
375
|
-
- **Cleared on session end**
|
|
376
|
-
|
|
377
|
-
---
|
|
378
|
-
|
|
379
|
-
### F. Branding, UI Customization, and Theming
|
|
380
|
-
|
|
381
|
-
```python
|
|
382
|
-
smx.set_site_logo("logo.png")
|
|
383
|
-
smx.set_site_title("My Company Assistant")
|
|
384
|
-
smx.set_user_icon("👤")
|
|
385
|
-
smx.set_bot_icon("🤖")
|
|
386
|
-
smx.enable_theme_toggle()
|
|
387
|
-
smx.set_ui_mode("smx")
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
---
|
|
391
|
-
|
|
392
|
-
### G. Roadmap & Future Directions
|
|
393
|
-
|
|
394
|
-
- Multi-agent chat UI (collaborative AI/roles/agents)
|
|
395
|
-
- Classroom-ready education kits
|
|
396
|
-
- Real-time streaming LLM responses
|
|
397
|
-
- Expanded analytics and ML modules
|
|
398
|
-
- Integrations with more vector DBs and cloud storage
|
|
399
|
-
- Automated scheduled data/ML jobs
|
|
400
|
-
|
|
401
|
-
---
|
|
402
|
-
|
|
403
|
-
## 6. Deployment Instructions
|
|
404
|
-
|
|
405
|
-
### A. Local Development / Testing
|
|
406
|
-
|
|
407
|
-
```bash
|
|
408
|
-
pip install "syntaxmatrix[analysis]"
|
|
409
|
-
python your_script.py
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
App at `http://localhost:5000/`.
|
|
413
|
-
|
|
414
|
-
---
|
|
415
|
-
|
|
416
|
-
### B. Production Deployment (Gunicorn + Nginx or Reverse Proxy)
|
|
417
|
-
|
|
418
|
-
```bash
|
|
419
|
-
pip install gunicorn
|
|
420
|
-
gunicorn -w 4 -b 0.0.0.0:8000 your_script:app
|
|
421
|
-
```
|
|
422
|
-
*(Export a Flask app with `app = smx.get_flask_app()`)*
|
|
423
|
-
|
|
424
|
-
---
|
|
425
|
-
|
|
426
|
-
### C. Docker Deployment
|
|
427
|
-
|
|
428
|
-
**Dockerfile example:**
|
|
429
|
-
|
|
430
|
-
```dockerfile
|
|
431
|
-
FROM python:3.11-slim
|
|
432
|
-
WORKDIR /app
|
|
433
|
-
COPY . /app
|
|
434
|
-
RUN pip install --upgrade pip && \
|
|
435
|
-
pip install "syntaxmatrix[analysis]"
|
|
436
|
-
EXPOSE 5000
|
|
437
|
-
CMD ["python", "your_script.py"]
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
**Build & run:**
|
|
441
|
-
|
|
442
|
-
```bash
|
|
443
|
-
docker build -t syntaxmatrix-app .
|
|
444
|
-
docker run -d -p 5000:5000 --name smx syntaxmatrix-app
|
|
445
|
-
```
|
|
446
|
-
|
|
447
|
-
---
|
|
448
|
-
|
|
449
|
-
### D. GCP Deployment (with Docker)
|
|
450
|
-
|
|
451
|
-
1. **Push your Docker image to GCP Artifact/Container Registry:**
|
|
452
|
-
|
|
453
|
-
```bash
|
|
454
|
-
docker tag syntaxmatrix-app gcr.io/your-gcp-project/syntaxmatrix-app:latest
|
|
455
|
-
docker push gcr.io/your-gcp-project/syntaxmatrix-app:latest
|
|
456
|
-
```
|
|
457
|
-
|
|
458
|
-
2. **Deploy to Google Cloud Run (recommended).**
|
|
459
|
-
|
|
460
|
-
---
|
|
461
|
-
|
|
462
|
-
### E. Environment Variables & Configuration Tips
|
|
463
|
-
|
|
464
|
-
- **PORT**: `smx.run(port=XXXX)`
|
|
465
|
-
- **Persistence**: Mount volume or use cloud storage for `/uploads` and SQLite DBs
|
|
466
|
-
- **Security**: Set env vars for sensitive keys
|
|
467
|
-
- **Scaling**: Use Cloud Run autoscaling or Gunicorn workers
|
|
468
|
-
|
|
469
|
-
---
|
|
470
|
-
|
|
471
|
-
### F. Troubleshooting
|
|
472
|
-
|
|
473
|
-
- **Port in use:** Change port in your script or Dockerfile
|
|
474
|
-
- **Missing deps:** Use `analysis` extra
|
|
475
|
-
- **File upload:** Ensure `/uploads` is writable
|
|
476
|
-
|
|
477
|
-
---
|
|
478
|
-
|
|
479
|
-
## 7. Extending & Customizing SyntaxMatrix
|
|
480
|
-
|
|
481
|
-
- **Register custom widgets** (input, button, dropdown, uploader)
|
|
482
|
-
- **Custom analytics/ML routines** with `syntaxmatrix.plottings`
|
|
483
|
-
- **Custom page CRUD via admin panel**
|
|
484
|
-
- **Branding and UI theming**
|
|
485
|
-
|
|
486
|
-
See earlier code examples.
|
|
487
|
-
|
|
488
|
-
---
|
|
489
|
-
|
|
490
|
-
## 8. Contributing
|
|
491
|
-
|
|
492
|
-
SyntaxMatrix welcomes contributions! Fork, branch, and submit PRs for features, bugfixes, docs, or analytics/ML routines.
|
|
493
|
-
|
|
494
|
-
- [GitHub Issues](https://github.com/bobganti/SyntaxMatrix/issues)
|
|
495
|
-
- [GitHub Discussions](https://github.com/bobganti/SyntaxMatrix/discussions)
|
|
496
|
-
|
|
497
|
-
---
|
|
498
|
-
|
|
499
|
-
## 9. Support & Contact
|
|
500
|
-
|
|
501
|
-
- **Email:** your-email@example.com *(change as needed)*
|
|
502
|
-
- **GitHub Issues/Discussions:** for all public bug reports and feature requests
|
|
503
|
-
- **Enterprise support:** contact via email or GitHub
|
|
504
|
-
|
|
505
|
-
---
|
|
506
|
-
|
|
507
|
-
## 10. License
|
|
508
|
-
|
|
509
|
-
MIT License
|
|
510
|
-
|
|
511
|
-
```text
|
|
512
|
-
MIT License
|
|
513
|
-
Copyright (c) 2025 Bob Nti
|
|
514
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy...
|
|
515
|
-
[Full MIT license text here]
|
|
516
|
-
```
|
|
517
|
-
|
|
518
|
-
---
|
|
519
|
-
|
|
520
|
-
## 11. Project Links
|
|
521
|
-
|
|
522
|
-
- [PyPI: syntaxmatrix](https://pypi.org/project/syntaxmatrix)
|
|
523
|
-
- [GitHub](https://github.com/bobganti/SyntaxMatrix)
|
|
524
|
-
- [Docs (Coming soon)](https://syntaxmatrix.ai)
|
|
525
|
-
|
|
526
|
-
---
|
|
527
|
-
|
|
528
|
-
## 12. Logo and Screenshots
|
|
529
|
-
|
|
530
|
-
- **Logo:** Replace the top placeholder with your logo (e.g., `logo.png`)
|
|
531
|
-
- **Screenshots:** Add real screenshots in each section
|
|
532
|
-
|
|
533
|
-
---
|
|
534
|
-
|
|
535
|
-
## 13. Roadmap & Acknowledgements
|
|
536
|
-
|
|
537
|
-
See roadmap above. Thanks to all contributors and users!
|
|
538
|
-
|
|
539
|
-
---
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Bob Nti
|
|
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.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|