@superatomai/sdk-node 0.0.65 → 0.0.67
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/README.md +942 -942
- package/dist/index.js +3 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6385,7 +6385,9 @@ Fixed SQL query:`;
|
|
|
6385
6385
|
let executedToolsText = "No external tools were executed for data fetching.";
|
|
6386
6386
|
if (executedTools && executedTools.length > 0) {
|
|
6387
6387
|
logger.info(`[${this.getProviderName()}] Passing ${executedTools.length} executed tools to component matching`);
|
|
6388
|
-
executedToolsText = "The following external tools were executed to fetch data.\n**IMPORTANT: For components displaying this data, use externalTool prop instead of query.**\n
|
|
6388
|
+
executedToolsText = "The following external tools were executed to fetch data.\n" + // '**IMPORTANT: For components displaying this data, use externalTool prop instead of query.**\n' +
|
|
6389
|
+
// '**IMPORTANT: Use ONLY the field names listed in outputSchema for config keys.**\n\n' +
|
|
6390
|
+
executedTools.map((tool, idx) => {
|
|
6389
6391
|
let outputSchemaText = "Not available";
|
|
6390
6392
|
let fieldNamesList = "";
|
|
6391
6393
|
let recordCount = "unknown";
|
|
@@ -6460,7 +6462,6 @@ ${executedToolsText}`);
|
|
|
6460
6462
|
logCollector?.info("Matching components from text response...");
|
|
6461
6463
|
let fullResponseText = "";
|
|
6462
6464
|
let answerComponentExtracted = false;
|
|
6463
|
-
let validatedAnswerComponent = null;
|
|
6464
6465
|
const answerCallback = componentStreamCallback;
|
|
6465
6466
|
const partialCallback = answerCallback ? (chunk) => {
|
|
6466
6467
|
fullResponseText += chunk;
|
|
@@ -6551,10 +6552,6 @@ ${executedToolsText}`);
|
|
|
6551
6552
|
if (currentQuery !== answerQuery) {
|
|
6552
6553
|
answerComponent.props.query = currentQuery;
|
|
6553
6554
|
}
|
|
6554
|
-
validatedAnswerComponent = {
|
|
6555
|
-
componentId: answerComponentData.componentId,
|
|
6556
|
-
validatedQuery: currentQuery
|
|
6557
|
-
};
|
|
6558
6555
|
logger.info(`[${this.getProviderName()}] \u2713 Answer component query validated (attempt ${attempts}) - STREAMING TO FRONTEND NOW`);
|
|
6559
6556
|
logCollector?.info(`\u2713 Answer component query validated - streaming to frontend`);
|
|
6560
6557
|
logger.info(`[${this.getProviderName()}] Calling answerCallback for: ${answerComponent.name}`);
|
|
@@ -6654,10 +6651,6 @@ ${executedToolsText}`);
|
|
|
6654
6651
|
return null;
|
|
6655
6652
|
}
|
|
6656
6653
|
let cleanedProps = { ...mc.props };
|
|
6657
|
-
if (validatedAnswerComponent && mc.componentId === validatedAnswerComponent.componentId) {
|
|
6658
|
-
logger.info(`[${this.getProviderName()}] Using pre-validated query for answer component: ${mc.componentId}`);
|
|
6659
|
-
cleanedProps.query = validatedAnswerComponent.validatedQuery;
|
|
6660
|
-
}
|
|
6661
6654
|
if (cleanedProps.externalTool) {
|
|
6662
6655
|
const toolId = cleanedProps.externalTool.toolId;
|
|
6663
6656
|
const validToolIds = (executedTools || []).map((t) => t.id);
|