@superatomai/sdk-node 0.0.54 → 0.0.55
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/index.js +27 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5405,6 +5405,19 @@ var LLM = class {
|
|
|
5405
5405
|
// src/userResponse/base-llm.ts
|
|
5406
5406
|
init_logger();
|
|
5407
5407
|
|
|
5408
|
+
// src/utils/datetime.ts
|
|
5409
|
+
function getCurrentDateTimeForPrompt() {
|
|
5410
|
+
return (/* @__PURE__ */ new Date()).toLocaleString("en-US", {
|
|
5411
|
+
weekday: "long",
|
|
5412
|
+
year: "numeric",
|
|
5413
|
+
month: "long",
|
|
5414
|
+
day: "numeric",
|
|
5415
|
+
hour: "2-digit",
|
|
5416
|
+
minute: "2-digit",
|
|
5417
|
+
timeZoneName: "short"
|
|
5418
|
+
});
|
|
5419
|
+
}
|
|
5420
|
+
|
|
5408
5421
|
// src/userResponse/knowledge-base.ts
|
|
5409
5422
|
init_logger();
|
|
5410
5423
|
var getKnowledgeBase = async ({
|
|
@@ -5885,7 +5898,8 @@ ${fieldsText}`;
|
|
|
5885
5898
|
SCHEMA_DOC: schemaDoc,
|
|
5886
5899
|
DATABASE_RULES: databaseRules,
|
|
5887
5900
|
DEFERRED_TOOLS: deferredToolsText,
|
|
5888
|
-
EXECUTED_TOOLS: executedToolsText
|
|
5901
|
+
EXECUTED_TOOLS: executedToolsText,
|
|
5902
|
+
CURRENT_DATETIME: getCurrentDateTimeForPrompt()
|
|
5889
5903
|
});
|
|
5890
5904
|
logger.debug(`[${this.getProviderName()}] Loaded match-text-components prompts`);
|
|
5891
5905
|
const systemPromptStr = Array.isArray(prompts.system) ? prompts.system.join("\n") : prompts.system;
|
|
@@ -6160,7 +6174,8 @@ ${executedToolsText}`);
|
|
|
6160
6174
|
USER_PROMPT: userPrompt,
|
|
6161
6175
|
CONVERSATION_HISTORY: conversationHistory || "No previous conversation",
|
|
6162
6176
|
AVAILABLE_TOOLS: availableToolsDoc,
|
|
6163
|
-
SCHEMA_DOC: schemaDoc || "No database schema available"
|
|
6177
|
+
SCHEMA_DOC: schemaDoc || "No database schema available",
|
|
6178
|
+
CURRENT_DATETIME: getCurrentDateTimeForPrompt()
|
|
6164
6179
|
});
|
|
6165
6180
|
const systemPrompt = Array.isArray(prompts.system) ? prompts.system.join("\n") : prompts.system;
|
|
6166
6181
|
const userPromptText = Array.isArray(prompts.user) ? prompts.user.join("\n") : prompts.user;
|
|
@@ -6227,7 +6242,8 @@ ${executedToolsText}`);
|
|
|
6227
6242
|
COMPONENT_PROPS: JSON.stringify(component.props, null, 2),
|
|
6228
6243
|
CACHED_TEXT_RESPONSE: cachedTextResponse || "No cached text response available",
|
|
6229
6244
|
SCHEMA_DOC: schemaDoc || "No schema available",
|
|
6230
|
-
DATABASE_RULES: databaseRules
|
|
6245
|
+
DATABASE_RULES: databaseRules,
|
|
6246
|
+
CURRENT_DATETIME: getCurrentDateTimeForPrompt()
|
|
6231
6247
|
});
|
|
6232
6248
|
const result = await LLM.stream(
|
|
6233
6249
|
{
|
|
@@ -6359,7 +6375,8 @@ ${executedToolsText}`);
|
|
|
6359
6375
|
SCHEMA_DOC: schemaDoc,
|
|
6360
6376
|
DATABASE_RULES: databaseRules,
|
|
6361
6377
|
KNOWLEDGE_BASE_CONTEXT: knowledgeBaseContext || "No additional knowledge base context available.",
|
|
6362
|
-
AVAILABLE_EXTERNAL_TOOLS: availableToolsDoc
|
|
6378
|
+
AVAILABLE_EXTERNAL_TOOLS: availableToolsDoc,
|
|
6379
|
+
CURRENT_DATETIME: getCurrentDateTimeForPrompt()
|
|
6363
6380
|
});
|
|
6364
6381
|
const sysPrompt = Array.isArray(prompts.system) ? prompts.system.join("\n") : prompts.system;
|
|
6365
6382
|
const usrPrompt = Array.isArray(prompts.user) ? prompts.user.join("\n") : prompts.user;
|
|
@@ -7130,7 +7147,8 @@ ${errorMsg}
|
|
|
7130
7147
|
ORIGINAL_USER_PROMPT: originalUserPrompt,
|
|
7131
7148
|
COMPONENT_INFO: component_info,
|
|
7132
7149
|
COMPONENT_DATA: component_data,
|
|
7133
|
-
CONVERSATION_HISTORY: conversationHistory || "No previous conversation"
|
|
7150
|
+
CONVERSATION_HISTORY: conversationHistory || "No previous conversation",
|
|
7151
|
+
CURRENT_DATETIME: getCurrentDateTimeForPrompt()
|
|
7134
7152
|
});
|
|
7135
7153
|
const result = await LLM.stream(
|
|
7136
7154
|
{
|
|
@@ -11033,7 +11051,8 @@ async function pickComponentWithLLM(prompt, components, anthropicApiKey, groqApi
|
|
|
11033
11051
|
AVAILABLE_COMPONENTS: availableComponentsText,
|
|
11034
11052
|
SCHEMA_DOC: schemaDoc || "No database schema available",
|
|
11035
11053
|
DATABASE_RULES: databaseRules,
|
|
11036
|
-
AVAILABLE_TOOLS: availableToolsText
|
|
11054
|
+
AVAILABLE_TOOLS: availableToolsText,
|
|
11055
|
+
CURRENT_DATETIME: getCurrentDateTimeForPrompt()
|
|
11037
11056
|
});
|
|
11038
11057
|
logger.debug("[DASH_COMP_REQ] Loaded dash-comp-picker prompts with schema and tools");
|
|
11039
11058
|
const { apiKey, model } = getApiKeyAndModel(
|
|
@@ -11182,7 +11201,8 @@ async function createFilterWithLLM(prompt, components, existingComponents, anthr
|
|
|
11182
11201
|
EXISTING_COMPONENTS: formatExistingComponentsForPrompt(existingComponents),
|
|
11183
11202
|
SCHEMA_DOC: schemaDoc || "No database schema available",
|
|
11184
11203
|
DATABASE_RULES: databaseRules,
|
|
11185
|
-
AVAILABLE_TOOLS: formatToolsForPrompt(tools)
|
|
11204
|
+
AVAILABLE_TOOLS: formatToolsForPrompt(tools),
|
|
11205
|
+
CURRENT_DATETIME: getCurrentDateTimeForPrompt()
|
|
11186
11206
|
});
|
|
11187
11207
|
logger.debug("[DASH_COMP_REQ:FILTER] Loaded dash-filter-picker prompts");
|
|
11188
11208
|
const { apiKey, model } = getApiKeyAndModel(
|