syntaxmatrix 2.5.8__tar.gz → 2.5.8.1__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.5.8 → syntaxmatrix-2.5.8.1}/PKG-INFO +1 -1
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/SyntaxMatrix.egg-info/PKG-INFO +1 -1
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/setup.py +1 -1
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/agentic/agents.py +1 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/core.py +1 -1
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/routes.py +1 -1
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/utils.py +52 -4
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/LICENSE.txt +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/README.md +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/SyntaxMatrix.egg-info/SOURCES.txt +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/SyntaxMatrix.egg-info/dependency_links.txt +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/SyntaxMatrix.egg-info/requires.txt +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/SyntaxMatrix.egg-info/top_level.txt +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/pyproject.toml +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/setup.cfg +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/__init__.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/agentic/__init__.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/agentic/agent_tools.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/agentic/code_tools_registry.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/agentic/model_templates.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/auth.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/bootstrap.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/commentary.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/dataset_preprocessing.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/db.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/display.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/emailer.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/file_processor.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/generate_page.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/gpt_models_latest.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/history_store.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/kernel_manager.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/llm_store.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/models.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/plottings.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/preface.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/profiles.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/project_root.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/session.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/settings/__init__.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/settings/default.yaml +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/settings/logging.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/settings/model_map.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/settings/prompts.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/settings/string_navbar.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/smiv.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/smpv.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/css/style.css +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/docs.md +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/icons/favicon.png +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/icons/hero_bg.jpg +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/icons/logo.png +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/icons/svg_497526.svg +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/icons/svg_497528.svg +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/js/chat.js +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/js/sidebar.js +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/js/widgets.js +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/templates/change_password.html +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/templates/code_cell.html +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/templates/dashboard.html +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/templates/dataset_resize.html +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/templates/docs.html +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/templates/error.html +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/templates/login.html +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/templates/register.html +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/themes.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/ui_modes.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vector_db.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectordb/__init__.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectordb/adapters/__init__.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectordb/adapters/milvus_adapter.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectordb/adapters/pgvector_adapter.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectordb/adapters/sqlite_adapter.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectordb/base.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectordb/registry.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectorizer.py +0 -0
- {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/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.5.8",
|
|
11
|
+
version="2.5.8.1",
|
|
12
12
|
author="Bob Nti",
|
|
13
13
|
author_email="bob.nti@syntaxmatrix.net",
|
|
14
14
|
description="SyntaxMUI: A customizable framework for Python AI Assistant Projects.",
|
|
@@ -54,7 +54,7 @@ class SyntaxMUI:
|
|
|
54
54
|
port="5080",
|
|
55
55
|
user_icon="👩🏿🦲",
|
|
56
56
|
bot_icon="<img src='/static/icons/favicon.png' width=20' alt='bot'/>",
|
|
57
|
-
favicon="
|
|
57
|
+
favicon="/static/icons/favicon.png",
|
|
58
58
|
site_logo="<img src='/static/icons/logo.png' width='30' alt='logo'/>",
|
|
59
59
|
site_title="SyntaxMatrix",
|
|
60
60
|
project_name="smxAI",
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
|
-
import re, textwrap
|
|
3
|
-
import pandas as pd
|
|
4
|
-
import numpy as np
|
|
2
|
+
import re, textwrap, ast
|
|
3
|
+
import pandas as pd, numpy as np
|
|
5
4
|
import warnings
|
|
6
|
-
|
|
7
5
|
from difflib import get_close_matches
|
|
8
6
|
from typing import Iterable, Tuple, Dict
|
|
9
7
|
import inspect
|
|
@@ -645,6 +643,18 @@ def harden_ai_code(code: str) -> str:
|
|
|
645
643
|
fixed = _patch_feature_coef_dataframe(fixed)
|
|
646
644
|
fixed = _strip_file_io_ops(fixed)
|
|
647
645
|
|
|
646
|
+
metric_defaults = "\n".join([
|
|
647
|
+
"acc = None",
|
|
648
|
+
"accuracy = None",
|
|
649
|
+
"r2 = None",
|
|
650
|
+
"mae = None",
|
|
651
|
+
"rmse = None",
|
|
652
|
+
"f1 = None",
|
|
653
|
+
"precision = None",
|
|
654
|
+
"recall = None",
|
|
655
|
+
]) + "\n"
|
|
656
|
+
fixed = metric_defaults + fixed
|
|
657
|
+
|
|
648
658
|
# Import shared preface helpers once and wrap the LLM body safely
|
|
649
659
|
header = "from syntaxmatrix.preface import *\n\n"
|
|
650
660
|
wrapped = header + wrap_llm_code_safe(fixed)
|
|
@@ -1622,6 +1632,44 @@ def clean_llm_code(code: str) -> str:
|
|
|
1622
1632
|
"""
|
|
1623
1633
|
code = str(code or "")
|
|
1624
1634
|
|
|
1635
|
+
# Special case: sometimes the OpenAI SDK object repr (e.g. ChatCompletion(...))
|
|
1636
|
+
# is accidentally passed here as `code`. In that case, extract the actual
|
|
1637
|
+
# Python code from the ChatCompletionMessage(content=...) field.
|
|
1638
|
+
if "ChatCompletion(" in code and "ChatCompletionMessage" in code and "content=" in code:
|
|
1639
|
+
try:
|
|
1640
|
+
extracted = None
|
|
1641
|
+
|
|
1642
|
+
class _ChatCompletionVisitor(ast.NodeVisitor):
|
|
1643
|
+
def visit_Call(self, node):
|
|
1644
|
+
nonlocal extracted
|
|
1645
|
+
func = node.func
|
|
1646
|
+
fname = getattr(func, "id", None) or getattr(func, "attr", None)
|
|
1647
|
+
if fname == "ChatCompletionMessage":
|
|
1648
|
+
for kw in node.keywords:
|
|
1649
|
+
if kw.arg == "content" and isinstance(kw.value, ast.Constant) and isinstance(kw.value.value, str):
|
|
1650
|
+
extracted = kw.value.value
|
|
1651
|
+
self.generic_visit(node)
|
|
1652
|
+
|
|
1653
|
+
tree = ast.parse(code, mode="exec")
|
|
1654
|
+
_ChatCompletionVisitor().visit(tree)
|
|
1655
|
+
if extracted:
|
|
1656
|
+
code = extracted
|
|
1657
|
+
except Exception:
|
|
1658
|
+
# Best-effort regex fallback if AST parsing fails
|
|
1659
|
+
m = re.search(r"content=(?P<q>['\\\"])(?P<body>.*?)(?P=q)", code, flags=re.S)
|
|
1660
|
+
if m:
|
|
1661
|
+
code = m.group("body")
|
|
1662
|
+
|
|
1663
|
+
# Existing logic continues unchanged below...
|
|
1664
|
+
# Extract fenced blocks (```python ... ``` or ``` ... ```)
|
|
1665
|
+
blocks = re.findall(r"```(?:python)?\s*(.*?)```", code, flags=re.I | re.S)
|
|
1666
|
+
|
|
1667
|
+
if blocks:
|
|
1668
|
+
# pick the largest block; small trailing blocks are usually garbage
|
|
1669
|
+
largest = max(blocks, key=lambda b: len(b.strip()))
|
|
1670
|
+
if len(largest.strip().splitlines()) >= 10:
|
|
1671
|
+
code = largest
|
|
1672
|
+
|
|
1625
1673
|
# Extract fenced blocks (```python ... ``` or ``` ... ```)
|
|
1626
1674
|
blocks = re.findall(r"```(?:python)?\s*(.*?)```", code, flags=re.I | re.S)
|
|
1627
1675
|
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectordb/adapters/milvus_adapter.py
RENAMED
|
File without changes
|
{syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectordb/adapters/pgvector_adapter.py
RENAMED
|
File without changes
|
{syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectordb/adapters/sqlite_adapter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|