@digipair/skill-llm 0.32.6 → 0.33.0
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 +14 -7
- package/index.esm2.js +14 -7
- package/libs/engine/src/lib/alias.interface.d.ts +9 -0
- package/libs/engine/src/lib/engine.d.ts +1 -1
- package/package.json +1 -1
- package/schema.en.json +0 -277
package/index.cjs2.js
CHANGED
@@ -23509,14 +23509,14 @@ function indent(str, spaces) {
|
|
23509
23509
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
23510
23510
|
// match is required
|
23511
23511
|
if (!match) {
|
23512
|
-
return
|
23512
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
23513
23513
|
v: nextMatch1
|
23514
23514
|
};
|
23515
23515
|
}
|
23516
23516
|
var token = match.token, offset = match.offset;
|
23517
23517
|
i1 += offset;
|
23518
23518
|
if (token === " ") {
|
23519
|
-
return
|
23519
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
23520
23520
|
}
|
23521
23521
|
tokens1 = _to_consumable_array$y(tokens1).concat([
|
23522
23522
|
token
|
@@ -23535,7 +23535,7 @@ function indent(str, spaces) {
|
|
23535
23535
|
if (contextKeys.some(function(el) {
|
23536
23536
|
return el.startsWith(name);
|
23537
23537
|
})) {
|
23538
|
-
return
|
23538
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
23539
23539
|
}
|
23540
23540
|
if (dateTimeIdentifiers.some(function(el) {
|
23541
23541
|
return el === name;
|
@@ -23554,9 +23554,9 @@ function indent(str, spaces) {
|
|
23554
23554
|
if (dateTimeIdentifiers.some(function(el) {
|
23555
23555
|
return el.startsWith(name);
|
23556
23556
|
})) {
|
23557
|
-
return
|
23557
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
23558
23558
|
}
|
23559
|
-
return
|
23559
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
23560
23560
|
v: nextMatch1
|
23561
23561
|
};
|
23562
23562
|
};
|
@@ -27346,7 +27346,8 @@ const globalInstance = typeof window === 'undefined' ? global : window;
|
|
27346
27346
|
var _globalInstance___DIGIPAIR_CONFIG__;
|
27347
27347
|
const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__) != null ? _globalInstance___DIGIPAIR_CONFIG__ : {
|
27348
27348
|
LIBRARIES: {},
|
27349
|
-
BASE_URL: 'https://cdn.jsdelivr.net/npm'
|
27349
|
+
BASE_URL: 'https://cdn.jsdelivr.net/npm',
|
27350
|
+
ALIAS: []
|
27350
27351
|
};
|
27351
27352
|
const isRemoteVersion = /^https?:\/\/[^\s/$.?#].[^\s]*$/;
|
27352
27353
|
const isPinsSettings = (value)=>{
|
@@ -27383,7 +27384,13 @@ const applyTemplate = (value, context)=>{
|
|
27383
27384
|
};
|
27384
27385
|
const executePins = async (settingsOrigin, context = {})=>{
|
27385
27386
|
var _settings_conditions, _settings_conditions1;
|
27386
|
-
|
27387
|
+
let settings = await preparePinsSettings(settingsOrigin, context);
|
27388
|
+
const alias = _config.ALIAS.find((alias)=>settings.library.split(':')[0] === alias.name);
|
27389
|
+
if (alias) {
|
27390
|
+
settings = await preparePinsSettings(_extends({}, settings, alias), {
|
27391
|
+
settings
|
27392
|
+
});
|
27393
|
+
}
|
27387
27394
|
if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
|
27388
27395
|
const results = [];
|
27389
27396
|
for(let index = 0; index < settings.conditions.each.length; index++){
|
package/index.esm2.js
CHANGED
@@ -23489,14 +23489,14 @@ function indent(str, spaces) {
|
|
23489
23489
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
23490
23490
|
// match is required
|
23491
23491
|
if (!match) {
|
23492
|
-
return
|
23492
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
|
23493
23493
|
v: nextMatch1
|
23494
23494
|
};
|
23495
23495
|
}
|
23496
23496
|
var token = match.token, offset = match.offset;
|
23497
23497
|
i1 += offset;
|
23498
23498
|
if (token === " ") {
|
23499
|
-
return
|
23499
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
23500
23500
|
}
|
23501
23501
|
tokens1 = _to_consumable_array$y(tokens1).concat([
|
23502
23502
|
token
|
@@ -23515,7 +23515,7 @@ function indent(str, spaces) {
|
|
23515
23515
|
if (contextKeys.some(function(el) {
|
23516
23516
|
return el.startsWith(name);
|
23517
23517
|
})) {
|
23518
|
-
return
|
23518
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
23519
23519
|
}
|
23520
23520
|
if (dateTimeIdentifiers.some(function(el) {
|
23521
23521
|
return el === name;
|
@@ -23534,9 +23534,9 @@ function indent(str, spaces) {
|
|
23534
23534
|
if (dateTimeIdentifiers.some(function(el) {
|
23535
23535
|
return el.startsWith(name);
|
23536
23536
|
})) {
|
23537
|
-
return
|
23537
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
23538
23538
|
}
|
23539
|
-
return
|
23539
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
|
23540
23540
|
v: nextMatch1
|
23541
23541
|
};
|
23542
23542
|
};
|
@@ -27326,7 +27326,8 @@ const globalInstance = typeof window === 'undefined' ? global : window;
|
|
27326
27326
|
var _globalInstance___DIGIPAIR_CONFIG__;
|
27327
27327
|
const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__) != null ? _globalInstance___DIGIPAIR_CONFIG__ : {
|
27328
27328
|
LIBRARIES: {},
|
27329
|
-
BASE_URL: 'https://cdn.jsdelivr.net/npm'
|
27329
|
+
BASE_URL: 'https://cdn.jsdelivr.net/npm',
|
27330
|
+
ALIAS: []
|
27330
27331
|
};
|
27331
27332
|
const isRemoteVersion = /^https?:\/\/[^\s/$.?#].[^\s]*$/;
|
27332
27333
|
const isPinsSettings = (value)=>{
|
@@ -27363,7 +27364,13 @@ const applyTemplate = (value, context)=>{
|
|
27363
27364
|
};
|
27364
27365
|
const executePins = async (settingsOrigin, context = {})=>{
|
27365
27366
|
var _settings_conditions, _settings_conditions1;
|
27366
|
-
|
27367
|
+
let settings = await preparePinsSettings(settingsOrigin, context);
|
27368
|
+
const alias = _config.ALIAS.find((alias)=>settings.library.split(':')[0] === alias.name);
|
27369
|
+
if (alias) {
|
27370
|
+
settings = await preparePinsSettings(_extends({}, settings, alias), {
|
27371
|
+
settings
|
27372
|
+
});
|
27373
|
+
}
|
27367
27374
|
if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
|
27368
27375
|
const results = [];
|
27369
27376
|
for(let index = 0; index < settings.conditions.each.length; index++){
|
package/package.json
CHANGED
package/schema.en.json
DELETED
@@ -1,277 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"openapi": "3.0.0",
|
3
|
-
"info": {
|
4
|
-
"title": "@digipair/skill-llm",
|
5
|
-
"summary": "LLM Model Management",
|
6
|
-
"description": "The @digipair/skill-llm skill allows the use of a large-scale language model.",
|
7
|
-
"version": "0.1.0",
|
8
|
-
"x-icon": "🚀"
|
9
|
-
},
|
10
|
-
"paths": {
|
11
|
-
"/invoke": {
|
12
|
-
"post": {
|
13
|
-
"tags": ["service"],
|
14
|
-
"summary": "LLM Reasoning",
|
15
|
-
"parameters": [
|
16
|
-
{
|
17
|
-
"name": "execute",
|
18
|
-
"required": true,
|
19
|
-
"description": "Execute",
|
20
|
-
"schema": {
|
21
|
-
"type": "array",
|
22
|
-
"items": {
|
23
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
24
|
-
}
|
25
|
-
}
|
26
|
-
},
|
27
|
-
{
|
28
|
-
"name": "input",
|
29
|
-
"summary": "Input Data",
|
30
|
-
"required": false,
|
31
|
-
"description": "input",
|
32
|
-
"schema": {
|
33
|
-
"type": "object"
|
34
|
-
}
|
35
|
-
}
|
36
|
-
],
|
37
|
-
"x-events": []
|
38
|
-
}
|
39
|
-
},
|
40
|
-
"/reasoningStep": {
|
41
|
-
"post": {
|
42
|
-
"tags": ["service"],
|
43
|
-
"summary": "Reasoning Step",
|
44
|
-
"parameters": [
|
45
|
-
{
|
46
|
-
"name": "attributes",
|
47
|
-
"summary": "Data",
|
48
|
-
"required": true,
|
49
|
-
"description": "attributes",
|
50
|
-
"schema": {
|
51
|
-
"type": "array",
|
52
|
-
"items": {
|
53
|
-
"$ref": "#/components/schemas/reasonningStepAttribute"
|
54
|
-
}
|
55
|
-
}
|
56
|
-
}
|
57
|
-
],
|
58
|
-
"x-events": []
|
59
|
-
}
|
60
|
-
},
|
61
|
-
"/basic": {
|
62
|
-
"post": {
|
63
|
-
"tags": ["service"],
|
64
|
-
"summary": "Generate",
|
65
|
-
"description": "Text generation via an LLM model",
|
66
|
-
"parameters": [
|
67
|
-
{
|
68
|
-
"name": "prompt",
|
69
|
-
"summary": "Prompt",
|
70
|
-
"required": true,
|
71
|
-
"description": "Prompt to execute via the LLM model",
|
72
|
-
"schema": {
|
73
|
-
"type": "string"
|
74
|
-
}
|
75
|
-
},
|
76
|
-
{
|
77
|
-
"name": "model",
|
78
|
-
"summary": "LLM Model",
|
79
|
-
"required": false,
|
80
|
-
"description": "LLM model to load",
|
81
|
-
"schema": {
|
82
|
-
"type": "array",
|
83
|
-
"items": {
|
84
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
85
|
-
}
|
86
|
-
}
|
87
|
-
},
|
88
|
-
{
|
89
|
-
"name": "schema",
|
90
|
-
"summary": "Schema",
|
91
|
-
"required": false,
|
92
|
-
"description": "JSON schema of the data to extract",
|
93
|
-
"schema": {
|
94
|
-
"type": "object"
|
95
|
-
}
|
96
|
-
}
|
97
|
-
],
|
98
|
-
"x-events": []
|
99
|
-
}
|
100
|
-
},
|
101
|
-
"/vision": {
|
102
|
-
"post": {
|
103
|
-
"tags": ["service"],
|
104
|
-
"summary": "See",
|
105
|
-
"description": "Use an LLM model that can read images and text as input",
|
106
|
-
"parameters": [
|
107
|
-
{
|
108
|
-
"name": "model",
|
109
|
-
"summary": "Vision Model",
|
110
|
-
"required": false,
|
111
|
-
"description": "Vision model to load",
|
112
|
-
"schema": {
|
113
|
-
"type": "array",
|
114
|
-
"items": {
|
115
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
116
|
-
}
|
117
|
-
}
|
118
|
-
},
|
119
|
-
{
|
120
|
-
"name": "prompt",
|
121
|
-
"summary": "Prompt",
|
122
|
-
"required": true,
|
123
|
-
"description": "Prompt to execute on the LLM model",
|
124
|
-
"schema": {
|
125
|
-
"type": "string"
|
126
|
-
}
|
127
|
-
},
|
128
|
-
{
|
129
|
-
"name": "image",
|
130
|
-
"summary": "Image",
|
131
|
-
"required": true,
|
132
|
-
"description": "Base64 image",
|
133
|
-
"schema": {
|
134
|
-
"type": "string"
|
135
|
-
}
|
136
|
-
},
|
137
|
-
{
|
138
|
-
"name": "schema",
|
139
|
-
"summary": "JSON Schema",
|
140
|
-
"required": false,
|
141
|
-
"description": "JSON schema of the data to extract",
|
142
|
-
"schema": {
|
143
|
-
"type": "object"
|
144
|
-
}
|
145
|
-
}
|
146
|
-
],
|
147
|
-
"x-events": []
|
148
|
-
}
|
149
|
-
},
|
150
|
-
"/summarization": {
|
151
|
-
"post": {
|
152
|
-
"tags": ["service"],
|
153
|
-
"summary": "Summarize Text",
|
154
|
-
"description": "Summarize text via an LLM model",
|
155
|
-
"parameters": [
|
156
|
-
{
|
157
|
-
"name": "model",
|
158
|
-
"summary": "LLM Model",
|
159
|
-
"required": false,
|
160
|
-
"description": "LLM model to load",
|
161
|
-
"schema": {
|
162
|
-
"type": "array",
|
163
|
-
"items": {
|
164
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
165
|
-
}
|
166
|
-
}
|
167
|
-
},
|
168
|
-
{
|
169
|
-
"name": "chunkSize",
|
170
|
-
"summary": "Text Chunk Size",
|
171
|
-
"required": false,
|
172
|
-
"description": "Size of text chunks",
|
173
|
-
"schema": {
|
174
|
-
"type": "number"
|
175
|
-
}
|
176
|
-
},
|
177
|
-
{
|
178
|
-
"name": "type",
|
179
|
-
"summary": "Algorithm",
|
180
|
-
"required": false,
|
181
|
-
"description": "Algorithm to use for summarizing the text",
|
182
|
-
"schema": {
|
183
|
-
"type": "string"
|
184
|
-
}
|
185
|
-
},
|
186
|
-
{
|
187
|
-
"name": "prompt",
|
188
|
-
"summary": "Text",
|
189
|
-
"required": true,
|
190
|
-
"description": "Text to summarize",
|
191
|
-
"schema": {
|
192
|
-
"type": "string"
|
193
|
-
}
|
194
|
-
},
|
195
|
-
{
|
196
|
-
"name": "combineMapPrompt",
|
197
|
-
"summary": "",
|
198
|
-
"required": false,
|
199
|
-
"description": "combineMapPrompt",
|
200
|
-
"schema": {
|
201
|
-
"type": "string"
|
202
|
-
}
|
203
|
-
},
|
204
|
-
{
|
205
|
-
"name": "combinePrompt",
|
206
|
-
"summary": "",
|
207
|
-
"required": false,
|
208
|
-
"description": "combinePrompt",
|
209
|
-
"schema": {
|
210
|
-
"type": "string"
|
211
|
-
}
|
212
|
-
},
|
213
|
-
{
|
214
|
-
"name": "returnIntermediateSteps",
|
215
|
-
"summary": "",
|
216
|
-
"required": false,
|
217
|
-
"description": "returnIntermediateSteps",
|
218
|
-
"schema": {
|
219
|
-
"type": "boolean"
|
220
|
-
}
|
221
|
-
},
|
222
|
-
{
|
223
|
-
"name": "refinePrompt",
|
224
|
-
"summary": "",
|
225
|
-
"required": false,
|
226
|
-
"description": "refinePrompt",
|
227
|
-
"schema": {
|
228
|
-
"type": "string"
|
229
|
-
}
|
230
|
-
},
|
231
|
-
{
|
232
|
-
"name": "questionPrompt",
|
233
|
-
"summary": "",
|
234
|
-
"required": false,
|
235
|
-
"description": "questionPrompt",
|
236
|
-
"schema": {
|
237
|
-
"type": "string"
|
238
|
-
}
|
239
|
-
},
|
240
|
-
{
|
241
|
-
"name": "verbose",
|
242
|
-
"summary": "Debug",
|
243
|
-
"required": false,
|
244
|
-
"description": "Adds debug logs",
|
245
|
-
"schema": {
|
246
|
-
"type": "boolean"
|
247
|
-
}
|
248
|
-
}
|
249
|
-
],
|
250
|
-
"x-events": []
|
251
|
-
}
|
252
|
-
}
|
253
|
-
},
|
254
|
-
"components": {
|
255
|
-
"schemas": {
|
256
|
-
"reasonningStepAttribute": {
|
257
|
-
"tags": ["service"],
|
258
|
-
"summary": "Data",
|
259
|
-
"type": "object",
|
260
|
-
"properties": {
|
261
|
-
"name": {
|
262
|
-
"type": "string",
|
263
|
-
"summary": "Name"
|
264
|
-
},
|
265
|
-
"value": {
|
266
|
-
"summary": "Value",
|
267
|
-
"type": "array",
|
268
|
-
"items": {
|
269
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
270
|
-
}
|
271
|
-
}
|
272
|
-
},
|
273
|
-
"required": ["name", "value"]
|
274
|
-
}
|
275
|
-
}
|
276
|
-
}
|
277
|
-
}
|