syntaxmatrix 2.5.6.1__tar.gz → 2.5.7__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.6.1 → syntaxmatrix-2.5.7}/PKG-INFO +1 -1
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/SyntaxMatrix.egg-info/PKG-INFO +1 -1
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/setup.py +1 -1
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/agentic/agents.py +69 -96
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/core.py +3 -3
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/routes.py +3 -4
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/settings/model_map.py +4 -2
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/templates/dashboard.html +58 -26
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/LICENSE.txt +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/README.md +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/SyntaxMatrix.egg-info/SOURCES.txt +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/SyntaxMatrix.egg-info/dependency_links.txt +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/SyntaxMatrix.egg-info/requires.txt +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/SyntaxMatrix.egg-info/top_level.txt +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/pyproject.toml +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/setup.cfg +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/__init__.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/agentic/__init__.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/agentic/agent_tools.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/agentic/code_tools_registry.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/agentic/model_templates.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/auth.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/bootstrap.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/commentary.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/dataset_preprocessing.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/db.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/display.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/emailer.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/file_processor.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/generate_page.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/gpt_models_latest.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/history_store.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/kernel_manager.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/llm_store.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/models.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/plottings.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/preface.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/profiles.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/project_root.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/session.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/settings/__init__.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/settings/default.yaml +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/settings/logging.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/settings/prompts.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/settings/string_navbar.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/smiv.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/smpv.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/static/css/style.css +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/static/docs.md +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/static/icons/favicon.png +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/static/icons/hero_bg.jpg +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/static/icons/logo.png +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/static/icons/svg_497526.svg +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/static/icons/svg_497528.svg +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/static/js/chat.js +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/static/js/sidebar.js +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/static/js/widgets.js +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/templates/change_password.html +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/templates/code_cell.html +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/templates/docs.html +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/templates/error.html +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/templates/login.html +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/templates/register.html +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/themes.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/ui_modes.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/utils.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/vector_db.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/vectordb/__init__.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/vectordb/adapters/__init__.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/vectordb/adapters/milvus_adapter.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/vectordb/adapters/pgvector_adapter.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/vectordb/adapters/sqlite_adapter.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/vectordb/base.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/vectordb/registry.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/vectorizer.py +0 -0
- {syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/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.
|
|
11
|
+
version="2.5.7",
|
|
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.",
|
|
@@ -42,7 +42,7 @@ def token_calculator(total_input_content, llm_profile):
|
|
|
42
42
|
input_prompt_tokens = len(enc.encode(total_input_content))
|
|
43
43
|
return input_prompt_tokens
|
|
44
44
|
|
|
45
|
-
def mlearning_agent(user_prompt, system_prompt, coding_profile
|
|
45
|
+
def mlearning_agent(user_prompt, system_prompt, coding_profile):
|
|
46
46
|
"""
|
|
47
47
|
Returns:
|
|
48
48
|
(text, usage_dict)
|
|
@@ -95,72 +95,41 @@ def mlearning_agent(user_prompt, system_prompt, coding_profile, temperature=0.1,
|
|
|
95
95
|
# Google
|
|
96
96
|
def google_generate_code():
|
|
97
97
|
nonlocal usage
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
)
|
|
98
|
+
config = types.GenerateContentConfig(
|
|
99
|
+
system_instruction=system_prompt,
|
|
100
|
+
# Optional: Force the model to generate a Python code block as JSON
|
|
101
|
+
response_mime_type="application/json",
|
|
102
|
+
response_schema=types.Schema(
|
|
103
|
+
type=types.Type.OBJECT,
|
|
104
|
+
properties={
|
|
105
|
+
"code": types.Schema(type=types.Type.STRING, description="The runnable Python code."),
|
|
106
|
+
"explanation": types.Schema(type=types.Type.STRING, description="A brief explanation of the code."),
|
|
107
|
+
},
|
|
108
|
+
required=["code"]
|
|
109
|
+
),
|
|
110
|
+
)
|
|
110
111
|
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
try:
|
|
113
|
+
response = _client.models.generate_content(
|
|
113
114
|
model=_model,
|
|
114
|
-
contents=
|
|
115
|
+
contents=user_prompt,
|
|
115
116
|
config=config,
|
|
116
117
|
)
|
|
118
|
+
except Exception as e:
|
|
119
|
+
return f"An error occurred during API call: {e}"
|
|
117
120
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
# 4. Response Extraction (same robust logic as before)
|
|
125
|
-
text = getattr(resp, "text", None)
|
|
126
|
-
if isinstance(text, str) and text.strip():
|
|
127
|
-
return text.strip()
|
|
128
|
-
|
|
129
|
-
chunks = []
|
|
130
|
-
candidates = getattr(resp, "candidates", None) or []
|
|
131
|
-
for cand in candidates:
|
|
132
|
-
content = getattr(cand, "content", None)
|
|
133
|
-
if content:
|
|
134
|
-
parts = getattr(content, "parts", None) or []
|
|
135
|
-
for part in parts:
|
|
136
|
-
t = getattr(part, "text", None)
|
|
137
|
-
if t:
|
|
138
|
-
chunks.append(str(t))
|
|
139
|
-
|
|
140
|
-
text = "\n".join(chunks).strip()
|
|
141
|
-
if text:
|
|
142
|
-
return text
|
|
143
|
-
|
|
144
|
-
# 5. Handle blocked response
|
|
145
|
-
fb = getattr(resp, "prompt_feedback", None)
|
|
146
|
-
block_reason = getattr(fb, "block_reason", None) if fb else None
|
|
147
|
-
if block_reason and block_reason != types.BlockedReason.REASON_UNSPECIFIED:
|
|
148
|
-
raise RuntimeError(f"{_model} blocked the response. Reason: {block_reason.name}")
|
|
149
|
-
raise RuntimeError(f"{_model} failed to return content due to insufficient data.")
|
|
121
|
+
# 3. Token Usage Capture and Context Overhead Calculation
|
|
122
|
+
um = response.usage_metadata
|
|
123
|
+
usage["input_tokens"] = um.prompt_token_count
|
|
124
|
+
usage["output_tokens"] = um.candidates_token_count + um.thoughts_token_count
|
|
125
|
+
usage["total_tokens"] = um.total_token_count
|
|
150
126
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
127
|
+
try:
|
|
128
|
+
# The response text will be a JSON string due to the config.
|
|
129
|
+
response_json = json.loads(response.text)
|
|
130
|
+
return response_json.get("code", "Error: Code field not found in response.")
|
|
154
131
|
except Exception as e:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
# --- Return the error message wrapped in the required output code structure ---
|
|
158
|
-
msg = f"I smxAI have instructed {error_msg}\n"
|
|
159
|
-
return (
|
|
160
|
-
f"# {msg}\n"
|
|
161
|
-
"from syntaxmatrix.display import show\n"
|
|
162
|
-
f"show({msg!r})\n"
|
|
163
|
-
)
|
|
132
|
+
return f"Error parsing response as JSON: {e}\nRaw Response: {response.text}"
|
|
164
133
|
|
|
165
134
|
# OpenAI Responses API
|
|
166
135
|
def gpt_models_latest_generate_code():
|
|
@@ -225,15 +194,14 @@ def mlearning_agent(user_prompt, system_prompt, coding_profile, temperature=0.1,
|
|
|
225
194
|
"from syntaxmatrix.display import show\n"
|
|
226
195
|
f"show({msg!r})\n"
|
|
227
196
|
)
|
|
228
|
-
|
|
197
|
+
|
|
229
198
|
# Anthropic
|
|
230
199
|
def anthropic_generate_code():
|
|
231
200
|
nonlocal usage
|
|
232
201
|
try:
|
|
233
202
|
resp = _client.messages.create(
|
|
234
203
|
model=_model,
|
|
235
|
-
|
|
236
|
-
temperature=temperature,
|
|
204
|
+
temperature=0,
|
|
237
205
|
system=system_prompt,
|
|
238
206
|
messages=[
|
|
239
207
|
{"role": "user", "content": user_prompt}
|
|
@@ -276,40 +244,44 @@ def mlearning_agent(user_prompt, system_prompt, coding_profile, temperature=0.1,
|
|
|
276
244
|
def openai_sdk_generate_code():
|
|
277
245
|
nonlocal usage
|
|
278
246
|
try:
|
|
279
|
-
|
|
247
|
+
response = None
|
|
248
|
+
if _model == "deepseek-reasoner":
|
|
249
|
+
response = _client.chat.completions.create(
|
|
250
|
+
model=_model,
|
|
251
|
+
messages=[
|
|
252
|
+
{"role": "system", "content": system_prompt},
|
|
253
|
+
{"role": "user", "content": user_prompt},
|
|
254
|
+
],
|
|
255
|
+
extra_body={"thinking": {"type": "enabled"}},
|
|
256
|
+
temperature=0,
|
|
257
|
+
stream=False
|
|
258
|
+
)
|
|
259
|
+
else:
|
|
260
|
+
response = _client.chat.completions.create(
|
|
280
261
|
model=_model,
|
|
281
262
|
messages=[
|
|
282
263
|
{"role": "system", "content": system_prompt},
|
|
283
264
|
{"role": "user", "content": user_prompt},
|
|
284
265
|
],
|
|
285
|
-
|
|
286
|
-
|
|
266
|
+
extra_body={"thinking": {"type": "enabled"}},
|
|
267
|
+
temperature=0,
|
|
268
|
+
stream=False
|
|
287
269
|
)
|
|
270
|
+
content = response.choices[0].message.content
|
|
288
271
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
um = resp.usage
|
|
272
|
+
um = response.usage
|
|
292
273
|
usage["input_tokens"] = um.prompt_tokens
|
|
293
274
|
usage["output_tokens"] = um.completion_tokens
|
|
294
275
|
usage["total_tokens"] = um.total_tokens
|
|
295
276
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
first = choices[0]
|
|
305
|
-
fr = getattr(first, "finish_reason", None)
|
|
306
|
-
if fr and fr != "stop":
|
|
307
|
-
block_reason = fr
|
|
308
|
-
|
|
309
|
-
if block_reason:
|
|
310
|
-
raise RuntimeError(f"{_model} stopped with reason: {block_reason}")
|
|
311
|
-
# Fallback: nothing useful came back
|
|
312
|
-
raise RuntimeError(f"{_model} returned nothing in this section due to insufficient data.")
|
|
277
|
+
code_match = re.search(r"```(?:python)?\n(.*?)```", content, re.DOTALL)
|
|
278
|
+
|
|
279
|
+
if code_match:
|
|
280
|
+
return code_match.group(1).strip()
|
|
281
|
+
else:
|
|
282
|
+
# If no markdown blocks are found, return the raw content
|
|
283
|
+
# (assuming the model obeyed instructions to output only code)
|
|
284
|
+
return content.strip()
|
|
313
285
|
|
|
314
286
|
except Exception as e:
|
|
315
287
|
# IMPORTANT: return VALID PYTHON so the dashboard can show the error
|
|
@@ -318,9 +290,7 @@ def mlearning_agent(user_prompt, system_prompt, coding_profile, temperature=0.1,
|
|
|
318
290
|
f"# {msg}\n"
|
|
319
291
|
"from syntaxmatrix.display import show\n"
|
|
320
292
|
f"show({msg!r})\n"
|
|
321
|
-
)
|
|
322
|
-
|
|
323
|
-
# print("TTOOKKEENN: ", token_calculator(system_prompt + user_prompt, coding_profile))
|
|
293
|
+
)
|
|
324
294
|
|
|
325
295
|
if _provider == "google":
|
|
326
296
|
code = google_generate_code()
|
|
@@ -447,7 +417,7 @@ def refine_question_agent(raw_question: str, dataset_context: str | None = None)
|
|
|
447
417
|
|
|
448
418
|
|
|
449
419
|
def classify_ml_job_agent(refined_question, dataset_profile):
|
|
450
|
-
|
|
420
|
+
import ast
|
|
451
421
|
def ml_response(user_prompt, system_prompt, profile):
|
|
452
422
|
_profile = profile # _prof.get_profile["admin"]
|
|
453
423
|
|
|
@@ -562,8 +532,9 @@ def classify_ml_job_agent(refined_question, dataset_profile):
|
|
|
562
532
|
system_prompt = ("""
|
|
563
533
|
You are a strict machine learning task classifier for an ML workbench.
|
|
564
534
|
Your goal is to correctly label the user's task specifications with the most relevant tags from a fixed list.
|
|
565
|
-
You Must always have 'data_preprocessing' as the 1st tag. Then add up to 4
|
|
566
|
-
If no relevant tag, default to "data_preprocessing"
|
|
535
|
+
You Must always have 'data_preprocessing' as the 1st tag. Then add up to 4 more, as needed, to make 5 max.
|
|
536
|
+
Your list should be 2-5 tags long. If no relevant tag, default to ["data_preprocessing"]
|
|
537
|
+
If tasks specs and `df` don't match (of different industries, return ['context mismatch']
|
|
567
538
|
You should return only your list of tags, no prelude or preamble.
|
|
568
539
|
""")
|
|
569
540
|
|
|
@@ -583,7 +554,7 @@ def classify_ml_job_agent(refined_question, dataset_profile):
|
|
|
583
554
|
"generative_modeling", "causal_inference", "risk_modeling", "graph_analysis",
|
|
584
555
|
|
|
585
556
|
# Foundational/Pipeline Steps
|
|
586
|
-
"
|
|
557
|
+
"data_preprocessing", "feature_engineering", "statistical_inference",
|
|
587
558
|
"model_validation", "hyperparameter_tuning"
|
|
588
559
|
]
|
|
589
560
|
|
|
@@ -591,7 +562,7 @@ def classify_ml_job_agent(refined_question, dataset_profile):
|
|
|
591
562
|
task_description = refined_question
|
|
592
563
|
|
|
593
564
|
user_prompt = f"""
|
|
594
|
-
Analyze the following task description:
|
|
565
|
+
Analyze and classify the following task description:
|
|
595
566
|
---
|
|
596
567
|
{task_description}
|
|
597
568
|
---
|
|
@@ -616,9 +587,11 @@ def classify_ml_job_agent(refined_question, dataset_profile):
|
|
|
616
587
|
|
|
617
588
|
llm_profile['client'] = _prof.get_client(llm_profile)
|
|
618
589
|
|
|
619
|
-
# Extract raw content
|
|
620
590
|
tasks = ml_response(user_prompt, system_prompt, llm_profile)
|
|
621
|
-
|
|
591
|
+
try:
|
|
592
|
+
return ast.literal_eval(tasks)
|
|
593
|
+
except Exception:
|
|
594
|
+
return tasks
|
|
622
595
|
|
|
623
596
|
|
|
624
597
|
def text_formatter_agent(text):
|
|
@@ -599,7 +599,7 @@ class SyntaxMUI:
|
|
|
599
599
|
from syntaxmatrix.gpt_models_latest import extract_output_text as _out, set_args
|
|
600
600
|
|
|
601
601
|
if not self._classification_profile:
|
|
602
|
-
classification_profile = _prof.get_profile('classification') or _prof.get_profile('
|
|
602
|
+
classification_profile = _prof.get_profile('classification') or _prof.get_profile('admin')
|
|
603
603
|
if not classification_profile:
|
|
604
604
|
return {"Error": "Set a profile for Classification"}
|
|
605
605
|
self._classification_profile = classification_profile
|
|
@@ -1317,11 +1317,11 @@ class SyntaxMUI:
|
|
|
1317
1317
|
""")
|
|
1318
1318
|
|
|
1319
1319
|
if not self._coding_profile:
|
|
1320
|
-
coding_profile = _prof.get_profile("coding") or _prof.get_profile("admin")
|
|
1320
|
+
coding_profile = _prof.get_profile("coding") # or _prof.get_profile("admin")
|
|
1321
1321
|
if not coding_profile:
|
|
1322
1322
|
return (
|
|
1323
1323
|
'<div class="smx-alert smx-alert-warn">'
|
|
1324
|
-
'No LLM profile configured for <code>coding</code>
|
|
1324
|
+
'No LLM profile configured for <code>coding</code> <br>'
|
|
1325
1325
|
'Please, add the LLM profile inside the admin panel or contact your Administrator.'
|
|
1326
1326
|
'</div>'
|
|
1327
1327
|
)
|
|
@@ -3047,7 +3047,7 @@ def setup_routes(smx):
|
|
|
3047
3047
|
}) + "\n\n"
|
|
3048
3048
|
|
|
3049
3049
|
except GeneratorExit:
|
|
3050
|
-
|
|
3050
|
+
return "Client aborted the stream."
|
|
3051
3051
|
except Exception as e:
|
|
3052
3052
|
smx.error(f"Stream error: {e}")
|
|
3053
3053
|
yield "data: " + json.dumps({"event": "error", "error": str(e)}) + "\n\n"
|
|
@@ -6513,8 +6513,7 @@ def setup_routes(smx):
|
|
|
6513
6513
|
cell["highlighted_code"] = Markup(_pygmentize(cell["code"]))
|
|
6514
6514
|
|
|
6515
6515
|
highlighted_ai_code = _pygmentize(ai_code)
|
|
6516
|
-
|
|
6517
|
-
|
|
6516
|
+
|
|
6518
6517
|
return render_template(
|
|
6519
6518
|
"dashboard.html",
|
|
6520
6519
|
section=section,
|
|
@@ -6525,7 +6524,7 @@ def setup_routes(smx):
|
|
|
6525
6524
|
highlighted_ai_code=highlighted_ai_code if ai_code else None,
|
|
6526
6525
|
askai_question=smx.sanitize_rough_to_markdown_task(askai_question),
|
|
6527
6526
|
refined_question=refined_question,
|
|
6528
|
-
tasks=
|
|
6527
|
+
tasks=tags,
|
|
6529
6528
|
data_cells=data_cells,
|
|
6530
6529
|
session_id=session_id,
|
|
6531
6530
|
llm_usage=llm_usage
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
position: fixed;
|
|
16
16
|
top: 0; left: 0;
|
|
17
17
|
width: 200px; height: 100vh;
|
|
18
|
-
background: #
|
|
18
|
+
background: #a3a4a5ff;
|
|
19
19
|
border-right: 1px solid #ccc;
|
|
20
20
|
padding: 26px 10px 10px 14px;
|
|
21
21
|
box-sizing: border-box;
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
min-height: 100vh;
|
|
57
57
|
box-sizing: border-box;
|
|
58
58
|
overflow-x: auto;
|
|
59
|
-
background: #
|
|
59
|
+
background: #dff0f5ff;
|
|
60
60
|
font-size: clamp(0.98rem, 2vw, 1.07rem);
|
|
61
61
|
}
|
|
62
62
|
.dashboard-tabs {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
top: 2px;
|
|
86
86
|
}
|
|
87
87
|
.dashboard-content {
|
|
88
|
-
background: #
|
|
88
|
+
background: #bbbbbd;
|
|
89
89
|
width: 100%;
|
|
90
90
|
padding: 10px;
|
|
91
91
|
border-radius: 0 0 10px 10px;
|
|
@@ -95,6 +95,10 @@
|
|
|
95
95
|
overflow-x: auto;
|
|
96
96
|
margin-right: 1vw;
|
|
97
97
|
}
|
|
98
|
+
|
|
99
|
+
textarea#askai{
|
|
100
|
+
background: #e5e5e5cd;
|
|
101
|
+
}
|
|
98
102
|
|
|
99
103
|
.smx-table {
|
|
100
104
|
padding: clamp(3px, 1vw, 9px) clamp(4px, 2vw, 13px);
|
|
@@ -590,6 +594,31 @@
|
|
|
590
594
|
.eda-card h3{ color: #1f2937 !important; }
|
|
591
595
|
.smx-stat h4{ color: #64748b !important; }
|
|
592
596
|
</style>
|
|
597
|
+
<style>
|
|
598
|
+
div.li > li {
|
|
599
|
+
margin-left: 35px;
|
|
600
|
+
}
|
|
601
|
+
/* 1. Style the arrow specifically */
|
|
602
|
+
.toggle-arrow {
|
|
603
|
+
display: inline-block; /* CRITICAL: Allows the element to rotate */
|
|
604
|
+
transition: transform 0.2s; /* Makes the rotation smooth */
|
|
605
|
+
margin-right: 6px; /* Spacing between arrow and text */
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
/* 2. Rotate and color when the menu is OPEN */
|
|
609
|
+
details[open] summary .toggle-arrow {
|
|
610
|
+
transform: rotate(90deg); /* Rotates the arrow downwards */
|
|
611
|
+
color: #007acc; /* Changes color to blue */
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/* 3. (Optional) Remove default browser markers to avoid double arrows */
|
|
615
|
+
details > summary {
|
|
616
|
+
list-style: none;
|
|
617
|
+
}
|
|
618
|
+
details > summary::-webkit-details-marker {
|
|
619
|
+
display: none;
|
|
620
|
+
}
|
|
621
|
+
</style>
|
|
593
622
|
|
|
594
623
|
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
|
|
595
624
|
</head>
|
|
@@ -611,8 +640,7 @@
|
|
|
611
640
|
<div class="dashboard-main">
|
|
612
641
|
<button id="sidebarToggle" class="sidebar-toggle" aria-label="Open menu"></button>
|
|
613
642
|
<ul class="dashboard-tabs">
|
|
614
|
-
<li class="{{ 'active' if section == 'explore' else '' }}"><a href="/dashboard?section=explore">Explore</a></li>
|
|
615
|
-
|
|
643
|
+
<li class="{{ 'active' if section == 'explore' else '' }}"><a href="/dashboard?section=explore">Explore</a></li>
|
|
616
644
|
</ul>
|
|
617
645
|
<div class="dashboard-content">
|
|
618
646
|
<div class="explore-card">
|
|
@@ -679,27 +707,31 @@
|
|
|
679
707
|
-->
|
|
680
708
|
<br><br>
|
|
681
709
|
<div class="refined-qblock">
|
|
682
|
-
|
|
683
|
-
<
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
<
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
710
|
+
<details>
|
|
711
|
+
<summary class="refined-q-label" style="cursor: pointer; list-style: none;">
|
|
712
|
+
<span class="toggle-arrow">▶</span>
|
|
713
|
+
<b>Thought Process</b>
|
|
714
|
+
</summary>
|
|
715
|
+
<div class="li" style="margin-top: 10px; padding-left: 14px; border-left: 3px solid #e0e5ee;">
|
|
716
|
+
<span class="refined-q">{{ refined_question|safe }}</span>
|
|
717
|
+
<br><br>
|
|
718
|
+
{% if tasks %}
|
|
719
|
+
<b>Tasks Performed: </b>
|
|
720
|
+
{% for task in tasks %}
|
|
721
|
+
<li>{{ task.replace('_', ' ').capitalize() }}</li>
|
|
722
|
+
{% endfor %}
|
|
723
|
+
{% endif %}
|
|
724
|
+
<br><br>
|
|
725
|
+
{% if llm_usage %}
|
|
726
|
+
<b>LLM: </b><span>{{ llm_usage.provider }} | {{ llm_usage.model }}</span><br>
|
|
727
|
+
<b>Token Usage: </b>
|
|
728
|
+
<li>Input Tokens: {{ llm_usage.input_tokens }}</li>
|
|
729
|
+
<li>Output Tokens: {{ llm_usage.output_tokens }}</li>
|
|
730
|
+
<li>Total Tokens: {{ llm_usage.total_tokens }}</li>
|
|
731
|
+
</div>
|
|
732
|
+
{% endif %}
|
|
733
|
+
</div>
|
|
734
|
+
</details>
|
|
703
735
|
{% endif %}
|
|
704
736
|
{% if ai_outputs %}
|
|
705
737
|
<div class="d-flex align-items-center justify-content-between" style="margin: 12px;">
|
|
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.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/vectordb/adapters/milvus_adapter.py
RENAMED
|
File without changes
|
{syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/vectordb/adapters/pgvector_adapter.py
RENAMED
|
File without changes
|
{syntaxmatrix-2.5.6.1 → syntaxmatrix-2.5.7}/syntaxmatrix/vectordb/adapters/sqlite_adapter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|