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.
Files changed (77) hide show
  1. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/PKG-INFO +1 -1
  2. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/SyntaxMatrix.egg-info/PKG-INFO +1 -1
  3. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/setup.py +1 -1
  4. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/agentic/agents.py +1 -0
  5. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/core.py +1 -1
  6. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/routes.py +1 -1
  7. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/utils.py +52 -4
  8. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/LICENSE.txt +0 -0
  9. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/README.md +0 -0
  10. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/SyntaxMatrix.egg-info/SOURCES.txt +0 -0
  11. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/SyntaxMatrix.egg-info/dependency_links.txt +0 -0
  12. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/SyntaxMatrix.egg-info/requires.txt +0 -0
  13. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/SyntaxMatrix.egg-info/top_level.txt +0 -0
  14. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/pyproject.toml +0 -0
  15. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/setup.cfg +0 -0
  16. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/__init__.py +0 -0
  17. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/agentic/__init__.py +0 -0
  18. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/agentic/agent_tools.py +0 -0
  19. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/agentic/code_tools_registry.py +0 -0
  20. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/agentic/model_templates.py +0 -0
  21. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/auth.py +0 -0
  22. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/bootstrap.py +0 -0
  23. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/commentary.py +0 -0
  24. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/dataset_preprocessing.py +0 -0
  25. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/db.py +0 -0
  26. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/display.py +0 -0
  27. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/emailer.py +0 -0
  28. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/file_processor.py +0 -0
  29. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/generate_page.py +0 -0
  30. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/gpt_models_latest.py +0 -0
  31. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/history_store.py +0 -0
  32. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/kernel_manager.py +0 -0
  33. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/llm_store.py +0 -0
  34. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/models.py +0 -0
  35. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/plottings.py +0 -0
  36. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/preface.py +0 -0
  37. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/profiles.py +0 -0
  38. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/project_root.py +0 -0
  39. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/session.py +0 -0
  40. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/settings/__init__.py +0 -0
  41. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/settings/default.yaml +0 -0
  42. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/settings/logging.py +0 -0
  43. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/settings/model_map.py +0 -0
  44. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/settings/prompts.py +0 -0
  45. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/settings/string_navbar.py +0 -0
  46. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/smiv.py +0 -0
  47. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/smpv.py +0 -0
  48. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/css/style.css +0 -0
  49. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/docs.md +0 -0
  50. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/icons/favicon.png +0 -0
  51. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/icons/hero_bg.jpg +0 -0
  52. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/icons/logo.png +0 -0
  53. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/icons/svg_497526.svg +0 -0
  54. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/icons/svg_497528.svg +0 -0
  55. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/js/chat.js +0 -0
  56. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/js/sidebar.js +0 -0
  57. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/static/js/widgets.js +0 -0
  58. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/templates/change_password.html +0 -0
  59. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/templates/code_cell.html +0 -0
  60. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/templates/dashboard.html +0 -0
  61. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/templates/dataset_resize.html +0 -0
  62. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/templates/docs.html +0 -0
  63. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/templates/error.html +0 -0
  64. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/templates/login.html +0 -0
  65. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/templates/register.html +0 -0
  66. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/themes.py +0 -0
  67. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/ui_modes.py +0 -0
  68. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vector_db.py +0 -0
  69. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectordb/__init__.py +0 -0
  70. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectordb/adapters/__init__.py +0 -0
  71. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectordb/adapters/milvus_adapter.py +0 -0
  72. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectordb/adapters/pgvector_adapter.py +0 -0
  73. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectordb/adapters/sqlite_adapter.py +0 -0
  74. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectordb/base.py +0 -0
  75. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectordb/registry.py +0 -0
  76. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/vectorizer.py +0 -0
  77. {syntaxmatrix-2.5.8 → syntaxmatrix-2.5.8.1}/syntaxmatrix/workspace_db.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: syntaxmatrix
3
- Version: 2.5.8
3
+ Version: 2.5.8.1
4
4
  Summary: SyntaxMUI: A customizable framework for Python AI Assistant Projects.
5
5
  Author: Bob Nti
6
6
  Author-email: bob.nti@syntaxmatrix.net
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: syntaxmatrix
3
- Version: 2.5.8
3
+ Version: 2.5.8.1
4
4
  Summary: SyntaxMUI: A customizable framework for Python AI Assistant Projects.
5
5
  Author: Bob Nti
6
6
  Author-email: bob.nti@syntaxmatrix.net
@@ -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.",
@@ -288,6 +288,7 @@ def mlearning_agent(user_prompt, system_prompt, coding_profile):
288
288
  else:
289
289
  code = openai_sdk_generate_code()
290
290
 
291
+ code = str(code or "")
291
292
  return code, usage
292
293
 
293
294
 
@@ -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="", # /static/icons/favicon.png",
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",
@@ -6525,7 +6525,7 @@ def setup_routes(smx):
6525
6525
  cell["highlighted_code"] = Markup(_pygmentize(cell["code"]))
6526
6526
 
6527
6527
  highlighted_ai_code = _pygmentize(ai_code)
6528
- smxAI = "Orion"
6528
+ smxAI = "smxAI"
6529
6529
 
6530
6530
  return render_template(
6531
6531
  "dashboard.html",
@@ -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