@melaya/runner 1.0.116 → 1.0.118
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.
- package/dist/assistantHost.py +16 -5
- package/package.json +1 -1
package/dist/assistantHost.py
CHANGED
|
@@ -434,11 +434,21 @@ def _build_agent():
|
|
|
434
434
|
if phone_enabled else ""
|
|
435
435
|
)
|
|
436
436
|
connector_rule = (
|
|
437
|
-
"-
|
|
438
|
-
"
|
|
439
|
-
"
|
|
440
|
-
"
|
|
441
|
-
"
|
|
437
|
+
"- ACTIVE CONNECTORS for this turn: " + ", ".join(connector_services) + ". "
|
|
438
|
+
"These are the ONLY external systems available RIGHT NOW. This overrides the "
|
|
439
|
+
"conversation history: if earlier in this chat you used a DIFFERENT connector "
|
|
440
|
+
"(another ERP/app the user has since DESELECTED), it is NO LONGER available - do "
|
|
441
|
+
"NOT search for or call its tools, and do NOT reuse tool names or API verbs from "
|
|
442
|
+
"that system (e.g. do not look for another ERP's model/method names here).\n"
|
|
443
|
+
"- Their tools are not all loaded upfront: call search_tools(query=...) with PLAIN "
|
|
444
|
+
"BUSINESS keywords (\"sales orders\", \"customers\", \"unpaid invoices\", \"headcount\") "
|
|
445
|
+
"- never another system's internal API names - then activate_tool(name=...) ONCE, then "
|
|
446
|
+
"call it. The results ARE the available tools: pick the closest match and USE it; do "
|
|
447
|
+
"NOT keep re-searching for a tool from a different system. If two searches for the same "
|
|
448
|
+
"need return the same kind of tool, STOP and activate it.\n"
|
|
449
|
+
"- Aggregations (top-N, group-by, totals, a chart) usually have NO dedicated tool: "
|
|
450
|
+
"activate the connector's GENERIC list/query tool, read the rows, and compute the "
|
|
451
|
+
"aggregation yourself. Never invent data - read it from the connector.\n"
|
|
442
452
|
if connector_services else ""
|
|
443
453
|
)
|
|
444
454
|
# Core primitives are ALWAYS in the lazy pool now, so the model must be told
|
|
@@ -467,6 +477,7 @@ def _build_agent():
|
|
|
467
477
|
+ connector_rule
|
|
468
478
|
+ core_rule
|
|
469
479
|
+ "- Be concise and concrete; format small tables or bullet lists when comparing items.\n"
|
|
480
|
+
"- CHARTS: when you use the `chart` tool, the graph ONLY renders if you paste the EXACT ```chart ...``` fenced block it returns into your reply. ALWAYS output that block verbatim where you want the chart shown; NEVER say 'the chart is above/below' or describe it instead. If you made several charts, include each block; if you regenerated one, include ONLY the final good version.\n"
|
|
470
481
|
"- If a question is outside the platform, answer normally without tools.\n"
|
|
471
482
|
+ (f"- Answer in the user's language: {language}.\n" if language and language != "en" else "")
|
|
472
483
|
)
|