@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.mjs
CHANGED
|
@@ -6334,7 +6334,9 @@ Fixed SQL query:`;
|
|
|
6334
6334
|
let executedToolsText = "No external tools were executed for data fetching.";
|
|
6335
6335
|
if (executedTools && executedTools.length > 0) {
|
|
6336
6336
|
logger.info(`[${this.getProviderName()}] Passing ${executedTools.length} executed tools to component matching`);
|
|
6337
|
-
executedToolsText = "The following external tools were executed to fetch data.\n**IMPORTANT: For components displaying this data, use externalTool prop instead of query.**\n
|
|
6337
|
+
executedToolsText = "The following external tools were executed to fetch data.\n" + // '**IMPORTANT: For components displaying this data, use externalTool prop instead of query.**\n' +
|
|
6338
|
+
// '**IMPORTANT: Use ONLY the field names listed in outputSchema for config keys.**\n\n' +
|
|
6339
|
+
executedTools.map((tool, idx) => {
|
|
6338
6340
|
let outputSchemaText = "Not available";
|
|
6339
6341
|
let fieldNamesList = "";
|
|
6340
6342
|
let recordCount = "unknown";
|
|
@@ -6409,7 +6411,6 @@ ${executedToolsText}`);
|
|
|
6409
6411
|
logCollector?.info("Matching components from text response...");
|
|
6410
6412
|
let fullResponseText = "";
|
|
6411
6413
|
let answerComponentExtracted = false;
|
|
6412
|
-
let validatedAnswerComponent = null;
|
|
6413
6414
|
const answerCallback = componentStreamCallback;
|
|
6414
6415
|
const partialCallback = answerCallback ? (chunk) => {
|
|
6415
6416
|
fullResponseText += chunk;
|
|
@@ -6500,10 +6501,6 @@ ${executedToolsText}`);
|
|
|
6500
6501
|
if (currentQuery !== answerQuery) {
|
|
6501
6502
|
answerComponent.props.query = currentQuery;
|
|
6502
6503
|
}
|
|
6503
|
-
validatedAnswerComponent = {
|
|
6504
|
-
componentId: answerComponentData.componentId,
|
|
6505
|
-
validatedQuery: currentQuery
|
|
6506
|
-
};
|
|
6507
6504
|
logger.info(`[${this.getProviderName()}] \u2713 Answer component query validated (attempt ${attempts}) - STREAMING TO FRONTEND NOW`);
|
|
6508
6505
|
logCollector?.info(`\u2713 Answer component query validated - streaming to frontend`);
|
|
6509
6506
|
logger.info(`[${this.getProviderName()}] Calling answerCallback for: ${answerComponent.name}`);
|
|
@@ -6603,10 +6600,6 @@ ${executedToolsText}`);
|
|
|
6603
6600
|
return null;
|
|
6604
6601
|
}
|
|
6605
6602
|
let cleanedProps = { ...mc.props };
|
|
6606
|
-
if (validatedAnswerComponent && mc.componentId === validatedAnswerComponent.componentId) {
|
|
6607
|
-
logger.info(`[${this.getProviderName()}] Using pre-validated query for answer component: ${mc.componentId}`);
|
|
6608
|
-
cleanedProps.query = validatedAnswerComponent.validatedQuery;
|
|
6609
|
-
}
|
|
6610
6603
|
if (cleanedProps.externalTool) {
|
|
6611
6604
|
const toolId = cleanedProps.externalTool.toolId;
|
|
6612
6605
|
const validToolIds = (executedTools || []).map((t) => t.id);
|