syntaxmatrix 2.2.8__tar.gz → 2.2.9__tar.gz
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-2.2.8 → syntaxmatrix-2.2.9}/PKG-INFO +1 -1
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/SyntaxMatrix.egg-info/PKG-INFO +1 -1
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/setup.py +1 -1
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/__init__.py +2 -2
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/routes.py +26 -40
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/LICENSE.txt +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/README.md +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/SyntaxMatrix.egg-info/SOURCES.txt +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/SyntaxMatrix.egg-info/dependency_links.txt +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/SyntaxMatrix.egg-info/requires.txt +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/SyntaxMatrix.egg-info/top_level.txt +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/pyproject.toml +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/setup.cfg +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/auth.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/bootstrap.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/commentary.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/core.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/db.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/display.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/emailer.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/file_processor.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/generate_page.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/gpt_models_latest.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/history_store.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/kernel_manager.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/llm_store.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/model_templates.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/models.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/plottings.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/profiles.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/project_root.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/session.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/settings/__init__.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/settings/default.yaml +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/settings/logging.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/settings/model_map.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/settings/prompts.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/settings/string_navbar.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/smiv.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/smpv.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/static/css/style.css +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/static/docs.md +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/static/icons/favicon.png +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/static/icons/hero_bg.jpg +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/static/icons/logo.png +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/static/icons/svg_497526.svg +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/static/icons/svg_497528.svg +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/static/js/chat.js +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/static/js/sidebar.js +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/static/js/widgets.js +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/templates/code_cell.html +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/templates/dashboard.html +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/templates/docs.html +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/templates/error.html +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/templates/login.html +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/templates/register.html +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/themes.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/ui_modes.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/utils.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/vector_db.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/vectordb/__init__.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/vectordb/adapters/__init__.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/vectordb/adapters/milvus_adapter.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/vectordb/adapters/pgvector_adapter.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/vectordb/adapters/sqlite_adapter.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/vectordb/base.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/vectordb/registry.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/vectorizer.py +0 -0
- {syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/workspace_db.py +0 -0
|
@@ -8,7 +8,7 @@ with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f:
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name="syntaxmatrix",
|
|
11
|
-
version="2.2.
|
|
11
|
+
version="2.2.9",
|
|
12
12
|
author="Bob Nti",
|
|
13
13
|
author_email="bob.nti@syntaxmatrix.com",
|
|
14
14
|
description="SyntaxMUI: A customizable framework for Python AI Assistant Projects.",
|
|
@@ -59,6 +59,6 @@ stream_write = _app_instance.stream_write
|
|
|
59
59
|
enable_stream = _app_instance.enable_stream
|
|
60
60
|
stream = _app_instance.stream
|
|
61
61
|
get_stream_args = _app_instance.get_stream_args
|
|
62
|
-
# set_stream_args = _app_instance.set_stream_args
|
|
63
62
|
|
|
64
|
-
|
|
63
|
+
|
|
64
|
+
app = _app_instance.app
|
|
@@ -50,9 +50,9 @@ _stream_q = queue.Queue()
|
|
|
50
50
|
_stream_cancelled = {}
|
|
51
51
|
_last_result_html = {} # { session_id: html_doc }
|
|
52
52
|
|
|
53
|
-
# store per-client so it stays alongside uploads
|
|
54
|
-
MLEARNING_OUTPUTS = os.path.join(_CLIENT_DIR, "mlearning_outputs")
|
|
55
|
-
os.makedirs(MLEARNING_OUTPUTS, exist_ok=True)
|
|
53
|
+
# # store per-client so it stays alongside uploads
|
|
54
|
+
# MLEARNING_OUTPUTS = os.path.join(_CLIENT_DIR, "mlearning_outputs")
|
|
55
|
+
# os.makedirs(MLEARNING_OUTPUTS, exist_ok=True)
|
|
56
56
|
|
|
57
57
|
# single, reused formatter: inline styles, padding, rounded corners, scroll
|
|
58
58
|
_FMT = _HtmlFmt(
|
|
@@ -5388,30 +5388,13 @@ def setup_routes(smx):
|
|
|
5388
5388
|
# 2.4 Append a single download button (explicit click → fetch → download)
|
|
5389
5389
|
download_url = url_for("download_result_html", session_id=session_id)
|
|
5390
5390
|
dl_html = f"""
|
|
5391
|
-
<
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
btn.textContent = 'Saving…';
|
|
5399
|
-
const resp = await fetch('{download_url}', {{
|
|
5400
|
-
method: 'POST',
|
|
5401
|
-
headers: {{ 'X-Requested-With': 'fetch' }}
|
|
5402
|
-
}});
|
|
5403
|
-
const data = await resp.json();
|
|
5404
|
-
if (!resp.ok || !data.ok) throw new Error(data.error || 'Save failed');
|
|
5405
|
-
btn.textContent = 'Saved to MLEARNING_OUTPUTS';
|
|
5406
|
-
}} catch (err) {{
|
|
5407
|
-
console.error(err);
|
|
5408
|
-
alert('Could not save. Please try again.');
|
|
5409
|
-
}} finally {{
|
|
5410
|
-
btn.disabled = false;
|
|
5411
|
-
}}
|
|
5412
|
-
}})(this)">
|
|
5413
|
-
Download
|
|
5414
|
-
</button>
|
|
5391
|
+
<a href="{download_url}">
|
|
5392
|
+
<button type="button"
|
|
5393
|
+
class="btn"
|
|
5394
|
+
style="margin:14px 0;padding:8px 12px;border:1px solid #0b6;border-radius:6px;background:#fff;color:#0b6;cursor:pointer;">
|
|
5395
|
+
Download
|
|
5396
|
+
</button>
|
|
5397
|
+
</a>
|
|
5415
5398
|
"""
|
|
5416
5399
|
ai_outputs.append(Markup(dl_html))
|
|
5417
5400
|
|
|
@@ -5489,26 +5472,29 @@ def setup_routes(smx):
|
|
|
5489
5472
|
data_cells=data_cells,
|
|
5490
5473
|
session_id=session_id,
|
|
5491
5474
|
)
|
|
5475
|
+
|
|
5492
5476
|
|
|
5493
|
-
|
|
5494
|
-
@smx.app.route("/download/result/html/<session_id>", methods=["POST"])
|
|
5477
|
+
@smx.app.route("/download/result/html/<session_id>", methods=["GET"])
|
|
5495
5478
|
def download_result_html(session_id):
|
|
5496
|
-
"""
|
|
5497
|
-
os.makedirs(MLEARNING_OUTPUTS, exist_ok=True)
|
|
5498
|
-
stamp = datetime.now().strftime("%Y%m%d-%H%M%S-%f")
|
|
5499
|
-
filename = f"result_{session_id}_{stamp}.html"
|
|
5500
|
-
path = os.path.join(MLEARNING_OUTPUTS, filename)
|
|
5501
|
-
|
|
5479
|
+
"""Stream the last-built result HTML as a browser download (no server save)."""
|
|
5502
5480
|
html_doc = _last_result_html.get(session_id)
|
|
5503
5481
|
if not html_doc:
|
|
5504
|
-
return
|
|
5505
|
-
with open(path, "w", encoding="utf-8") as f:
|
|
5506
|
-
f.write(html_doc)
|
|
5482
|
+
return ("No result available.", 404)
|
|
5507
5483
|
|
|
5508
|
-
|
|
5484
|
+
buf = io.BytesIO(html_doc.encode("utf-8"))
|
|
5485
|
+
buf.seek(0)
|
|
5486
|
+
|
|
5487
|
+
# keep a copy if you wish, or free it:
|
|
5509
5488
|
_last_result_html.pop(session_id, None)
|
|
5510
5489
|
|
|
5511
|
-
|
|
5490
|
+
stamp = datetime.now().strftime("%Y%m%d-%H%M%S-%f")
|
|
5491
|
+
filename = f"result_{session_id}_{stamp}.html"
|
|
5492
|
+
return send_file(
|
|
5493
|
+
buf,
|
|
5494
|
+
mimetype="text/html; charset=utf-8",
|
|
5495
|
+
as_attachment=True,
|
|
5496
|
+
download_name=filename
|
|
5497
|
+
)
|
|
5512
5498
|
|
|
5513
5499
|
# ── UPLOAD DATASET --------------------------------------
|
|
5514
5500
|
@smx.app.route("/dashboard/upload", methods=["POST"])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{syntaxmatrix-2.2.8 → syntaxmatrix-2.2.9}/syntaxmatrix/vectordb/adapters/pgvector_adapter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|