@digipair/skill-llm 0.8.8 → 0.8.11
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/index.cjs2.js +13 -8
- package/index.esm2.js +13 -8
- package/libs/engine/src/lib/engine.d.ts +0 -5
- package/package.json +1 -1
package/index.cjs2.js
CHANGED
@@ -23508,14 +23508,14 @@ function indent(str, spaces) {
|
|
23508
23508
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
23509
23509
|
// match is required
|
23510
23510
|
if (!match) {
|
23511
|
-
return
|
23511
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
|
23512
23512
|
v: nextMatch1
|
23513
23513
|
};
|
23514
23514
|
}
|
23515
23515
|
var token = match.token, offset = match.offset;
|
23516
23516
|
i1 += offset;
|
23517
23517
|
if (token === " ") {
|
23518
|
-
return
|
23518
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
23519
23519
|
}
|
23520
23520
|
tokens1 = _to_consumable_array$w(tokens1).concat([
|
23521
23521
|
token
|
@@ -23534,7 +23534,7 @@ function indent(str, spaces) {
|
|
23534
23534
|
if (contextKeys.some(function(el) {
|
23535
23535
|
return el.startsWith(name);
|
23536
23536
|
})) {
|
23537
|
-
return
|
23537
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
23538
23538
|
}
|
23539
23539
|
if (dateTimeIdentifiers.some(function(el) {
|
23540
23540
|
return el === name;
|
@@ -23553,9 +23553,9 @@ function indent(str, spaces) {
|
|
23553
23553
|
if (dateTimeIdentifiers.some(function(el) {
|
23554
23554
|
return el.startsWith(name);
|
23555
23555
|
})) {
|
23556
|
-
return
|
23556
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
23557
23557
|
}
|
23558
|
-
return
|
23558
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
|
23559
23559
|
v: nextMatch1
|
23560
23560
|
};
|
23561
23561
|
};
|
@@ -27417,8 +27417,11 @@ const executePinsList = async (pinsSettingsList, context, options = {
|
|
27417
27417
|
for(let i = 0; i < pinsSettingsList.length; i++){
|
27418
27418
|
var _settings_conditions;
|
27419
27419
|
const settings = pinsSettingsList[i];
|
27420
|
-
if (typeof ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.if) !== 'undefined'
|
27421
|
-
|
27420
|
+
if (typeof ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.if) !== 'undefined') {
|
27421
|
+
const preparedSettings = await preparePinsSettings(settings, context);
|
27422
|
+
if (!preparedSettings.conditions.if) {
|
27423
|
+
continue;
|
27424
|
+
}
|
27422
27425
|
}
|
27423
27426
|
previous = await executePins(settings, _extends({}, context, {
|
27424
27427
|
previous,
|
@@ -70240,7 +70243,9 @@ let LLMService = class LLMService {
|
|
70240
70243
|
const { execute, input = {} } = params;
|
70241
70244
|
const chain = RunnableSequence.from([
|
70242
70245
|
this.objectToInput(input),
|
70243
|
-
...await Promise.all(execute.map((pinsSettings)=>
|
70246
|
+
...await Promise.all(execute.map((pinsSettings)=>executePinsList([
|
70247
|
+
pinsSettings
|
70248
|
+
], context)))
|
70244
70249
|
]);
|
70245
70250
|
const result = await chain.invoke({});
|
70246
70251
|
return result;
|
package/index.esm2.js
CHANGED
@@ -23488,14 +23488,14 @@ function indent(str, spaces) {
|
|
23488
23488
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
23489
23489
|
// match is required
|
23490
23490
|
if (!match) {
|
23491
|
-
return
|
23491
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
|
23492
23492
|
v: nextMatch1
|
23493
23493
|
};
|
23494
23494
|
}
|
23495
23495
|
var token = match.token, offset = match.offset;
|
23496
23496
|
i1 += offset;
|
23497
23497
|
if (token === " ") {
|
23498
|
-
return
|
23498
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
23499
23499
|
}
|
23500
23500
|
tokens1 = _to_consumable_array$w(tokens1).concat([
|
23501
23501
|
token
|
@@ -23514,7 +23514,7 @@ function indent(str, spaces) {
|
|
23514
23514
|
if (contextKeys.some(function(el) {
|
23515
23515
|
return el.startsWith(name);
|
23516
23516
|
})) {
|
23517
|
-
return
|
23517
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
23518
23518
|
}
|
23519
23519
|
if (dateTimeIdentifiers.some(function(el) {
|
23520
23520
|
return el === name;
|
@@ -23533,9 +23533,9 @@ function indent(str, spaces) {
|
|
23533
23533
|
if (dateTimeIdentifiers.some(function(el) {
|
23534
23534
|
return el.startsWith(name);
|
23535
23535
|
})) {
|
23536
|
-
return
|
23536
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
23537
23537
|
}
|
23538
|
-
return
|
23538
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
|
23539
23539
|
v: nextMatch1
|
23540
23540
|
};
|
23541
23541
|
};
|
@@ -27397,8 +27397,11 @@ const executePinsList = async (pinsSettingsList, context, options = {
|
|
27397
27397
|
for(let i = 0; i < pinsSettingsList.length; i++){
|
27398
27398
|
var _settings_conditions;
|
27399
27399
|
const settings = pinsSettingsList[i];
|
27400
|
-
if (typeof ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.if) !== 'undefined'
|
27401
|
-
|
27400
|
+
if (typeof ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.if) !== 'undefined') {
|
27401
|
+
const preparedSettings = await preparePinsSettings(settings, context);
|
27402
|
+
if (!preparedSettings.conditions.if) {
|
27403
|
+
continue;
|
27404
|
+
}
|
27402
27405
|
}
|
27403
27406
|
previous = await executePins(settings, _extends({}, context, {
|
27404
27407
|
previous,
|
@@ -70220,7 +70223,9 @@ let LLMService = class LLMService {
|
|
70220
70223
|
const { execute, input = {} } = params;
|
70221
70224
|
const chain = RunnableSequence.from([
|
70222
70225
|
this.objectToInput(input),
|
70223
|
-
...await Promise.all(execute.map((pinsSettings)=>
|
70226
|
+
...await Promise.all(execute.map((pinsSettings)=>executePinsList([
|
70227
|
+
pinsSettings
|
70228
|
+
], context)))
|
70224
70229
|
]);
|
70225
70230
|
const result = await chain.invoke({});
|
70226
70231
|
return result;
|
@@ -4,11 +4,6 @@ export declare const config: {
|
|
4
4
|
set: (key: CONFIG_KEY, value: any) => void;
|
5
5
|
};
|
6
6
|
export declare const applyTemplate: (value: any, context: any) => any;
|
7
|
-
export declare const executePins: (settingsOrigin: PinsSettings, context?: any, options?: {
|
8
|
-
libraries: {
|
9
|
-
[key: string]: string;
|
10
|
-
};
|
11
|
-
}) => Promise<any>;
|
12
7
|
export declare const executePinsList: (pinsSettingsList: PinsSettings[], context: any, options?: {
|
13
8
|
libraries: {
|
14
9
|
[key: string]: string;
|