@digipair/skill-vespa 0.32.7 → 0.33.1
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.cjs.js +16 -7
- package/index.esm.js +16 -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 -308
package/index.cjs.js
CHANGED
@@ -63882,14 +63882,14 @@ function indent(str, spaces) {
|
|
63882
63882
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
63883
63883
|
// match is required
|
63884
63884
|
if (!match) {
|
63885
|
-
return nextMatch = nextMatch1,
|
63885
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
63886
63886
|
v: nextMatch1
|
63887
63887
|
};
|
63888
63888
|
}
|
63889
63889
|
var token = match.token, offset = match.offset;
|
63890
63890
|
i1 += offset;
|
63891
63891
|
if (token === " ") {
|
63892
|
-
return nextMatch = nextMatch1,
|
63892
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
63893
63893
|
}
|
63894
63894
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
63895
63895
|
token
|
@@ -63908,7 +63908,7 @@ function indent(str, spaces) {
|
|
63908
63908
|
if (contextKeys.some(function(el) {
|
63909
63909
|
return el.startsWith(name);
|
63910
63910
|
})) {
|
63911
|
-
return nextMatch = nextMatch1,
|
63911
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
63912
63912
|
}
|
63913
63913
|
if (dateTimeIdentifiers.some(function(el) {
|
63914
63914
|
return el === name;
|
@@ -63927,9 +63927,9 @@ function indent(str, spaces) {
|
|
63927
63927
|
if (dateTimeIdentifiers.some(function(el) {
|
63928
63928
|
return el.startsWith(name);
|
63929
63929
|
})) {
|
63930
|
-
return nextMatch = nextMatch1,
|
63930
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
63931
63931
|
}
|
63932
|
-
return nextMatch = nextMatch1,
|
63932
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
63933
63933
|
v: nextMatch1
|
63934
63934
|
};
|
63935
63935
|
};
|
@@ -67719,7 +67719,8 @@ const globalInstance = typeof window === 'undefined' ? global : window;
|
|
67719
67719
|
var _globalInstance___DIGIPAIR_CONFIG__;
|
67720
67720
|
const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__) != null ? _globalInstance___DIGIPAIR_CONFIG__ : {
|
67721
67721
|
LIBRARIES: {},
|
67722
|
-
BASE_URL: 'https://cdn.jsdelivr.net/npm'
|
67722
|
+
BASE_URL: 'https://cdn.jsdelivr.net/npm',
|
67723
|
+
ALIAS: []
|
67723
67724
|
};
|
67724
67725
|
const isRemoteVersion = /^https?:\/\/[^\s/$.?#].[^\s]*$/;
|
67725
67726
|
const isPinsSettings = (value)=>{
|
@@ -67756,7 +67757,15 @@ const applyTemplate = (value, context)=>{
|
|
67756
67757
|
};
|
67757
67758
|
const executePins = async (settingsOrigin, context = {})=>{
|
67758
67759
|
var _settings_conditions, _settings_conditions1;
|
67759
|
-
|
67760
|
+
let settings = await preparePinsSettings(settingsOrigin, context);
|
67761
|
+
const alias = _config.ALIAS.find((alias)=>settings.library.split(':')[0] === alias.name);
|
67762
|
+
if (alias) {
|
67763
|
+
settings = await preparePinsSettings(_extends({}, settings, alias), {
|
67764
|
+
settings: _extends({}, settings, {
|
67765
|
+
library: settings.library.substring(alias.name.length + 1)
|
67766
|
+
})
|
67767
|
+
});
|
67768
|
+
}
|
67760
67769
|
if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
|
67761
67770
|
const results = [];
|
67762
67771
|
for(let index = 0; index < settings.conditions.each.length; index++){
|
package/index.esm.js
CHANGED
@@ -63860,14 +63860,14 @@ function indent(str, spaces) {
|
|
63860
63860
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
63861
63861
|
// match is required
|
63862
63862
|
if (!match) {
|
63863
|
-
return tokens = tokens1,
|
63863
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
63864
63864
|
v: nextMatch1
|
63865
63865
|
};
|
63866
63866
|
}
|
63867
63867
|
var token = match.token, offset = match.offset;
|
63868
63868
|
i1 += offset;
|
63869
63869
|
if (token === " ") {
|
63870
|
-
return tokens = tokens1,
|
63870
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
63871
63871
|
}
|
63872
63872
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
63873
63873
|
token
|
@@ -63886,7 +63886,7 @@ function indent(str, spaces) {
|
|
63886
63886
|
if (contextKeys.some(function(el) {
|
63887
63887
|
return el.startsWith(name);
|
63888
63888
|
})) {
|
63889
|
-
return tokens = tokens1,
|
63889
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
63890
63890
|
}
|
63891
63891
|
if (dateTimeIdentifiers.some(function(el) {
|
63892
63892
|
return el === name;
|
@@ -63905,9 +63905,9 @@ function indent(str, spaces) {
|
|
63905
63905
|
if (dateTimeIdentifiers.some(function(el) {
|
63906
63906
|
return el.startsWith(name);
|
63907
63907
|
})) {
|
63908
|
-
return tokens = tokens1,
|
63908
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
63909
63909
|
}
|
63910
|
-
return tokens = tokens1,
|
63910
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
63911
63911
|
v: nextMatch1
|
63912
63912
|
};
|
63913
63913
|
};
|
@@ -67697,7 +67697,8 @@ const globalInstance = typeof window === 'undefined' ? global : window;
|
|
67697
67697
|
var _globalInstance___DIGIPAIR_CONFIG__;
|
67698
67698
|
const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__) != null ? _globalInstance___DIGIPAIR_CONFIG__ : {
|
67699
67699
|
LIBRARIES: {},
|
67700
|
-
BASE_URL: 'https://cdn.jsdelivr.net/npm'
|
67700
|
+
BASE_URL: 'https://cdn.jsdelivr.net/npm',
|
67701
|
+
ALIAS: []
|
67701
67702
|
};
|
67702
67703
|
const isRemoteVersion = /^https?:\/\/[^\s/$.?#].[^\s]*$/;
|
67703
67704
|
const isPinsSettings = (value)=>{
|
@@ -67734,7 +67735,15 @@ const applyTemplate = (value, context)=>{
|
|
67734
67735
|
};
|
67735
67736
|
const executePins = async (settingsOrigin, context = {})=>{
|
67736
67737
|
var _settings_conditions, _settings_conditions1;
|
67737
|
-
|
67738
|
+
let settings = await preparePinsSettings(settingsOrigin, context);
|
67739
|
+
const alias = _config.ALIAS.find((alias)=>settings.library.split(':')[0] === alias.name);
|
67740
|
+
if (alias) {
|
67741
|
+
settings = await preparePinsSettings(_extends({}, settings, alias), {
|
67742
|
+
settings: _extends({}, settings, {
|
67743
|
+
library: settings.library.substring(alias.name.length + 1)
|
67744
|
+
})
|
67745
|
+
});
|
67746
|
+
}
|
67738
67747
|
if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
|
67739
67748
|
const results = [];
|
67740
67749
|
for(let index = 0; index < settings.conditions.each.length; index++){
|
package/package.json
CHANGED
package/schema.en.json
DELETED
@@ -1,308 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"openapi": "3.0.0",
|
3
|
-
"info": {
|
4
|
-
"title": "@digipair/skill-vespa",
|
5
|
-
"summary": "Communication with a Vespa database",
|
6
|
-
"description": "This skill provides functionalities to interact with the data of a Vespa vector database.",
|
7
|
-
"version": "0.1.0",
|
8
|
-
"x-icon": "📘"
|
9
|
-
},
|
10
|
-
"paths": {
|
11
|
-
"/find": {
|
12
|
-
"post": {
|
13
|
-
"tags": ["service"],
|
14
|
-
"summary": "Retrieve",
|
15
|
-
"description": "Retrieve values from the database",
|
16
|
-
"parameters": [
|
17
|
-
{
|
18
|
-
"name": "baseUrl",
|
19
|
-
"summary": "Server address",
|
20
|
-
"required": false,
|
21
|
-
"description": "Address of the Vespa server",
|
22
|
-
"schema": {
|
23
|
-
"type": "string"
|
24
|
-
}
|
25
|
-
},
|
26
|
-
{
|
27
|
-
"name": "collection",
|
28
|
-
"summary": "Collection name",
|
29
|
-
"required": false,
|
30
|
-
"description": "Name of the collection to search in",
|
31
|
-
"schema": {
|
32
|
-
"type": "string"
|
33
|
-
}
|
34
|
-
},
|
35
|
-
{
|
36
|
-
"name": "limit",
|
37
|
-
"summary": "Limit",
|
38
|
-
"required": false,
|
39
|
-
"description": "Maximum number of responses",
|
40
|
-
"schema": {
|
41
|
-
"type": "number"
|
42
|
-
}
|
43
|
-
},
|
44
|
-
{
|
45
|
-
"name": "orderby",
|
46
|
-
"summary": "Ordered by",
|
47
|
-
"required": false,
|
48
|
-
"description": "Ordering of the responses",
|
49
|
-
"schema": {
|
50
|
-
"type": "string"
|
51
|
-
}
|
52
|
-
},
|
53
|
-
{
|
54
|
-
"name": "query",
|
55
|
-
"summary": "Query",
|
56
|
-
"required": true,
|
57
|
-
"description": "Search query",
|
58
|
-
"schema": {
|
59
|
-
"type": "string"
|
60
|
-
}
|
61
|
-
},
|
62
|
-
{
|
63
|
-
"name": "grouping",
|
64
|
-
"summary": "Grouping filter",
|
65
|
-
"required": false,
|
66
|
-
"description": "Grouping filter for the responses",
|
67
|
-
"schema": {
|
68
|
-
"type": "string"
|
69
|
-
}
|
70
|
-
}
|
71
|
-
],
|
72
|
-
"x-events": []
|
73
|
-
}
|
74
|
-
},
|
75
|
-
"/search": {
|
76
|
-
"post": {
|
77
|
-
"tags": ["service"],
|
78
|
-
"summary": "Search",
|
79
|
-
"description": "Semantic search in a collection",
|
80
|
-
"parameters": [
|
81
|
-
{
|
82
|
-
"name": "embeddings",
|
83
|
-
"summary": "Embeddings model",
|
84
|
-
"required": false,
|
85
|
-
"description": "Embeddings model",
|
86
|
-
"schema": {
|
87
|
-
"type": "array",
|
88
|
-
"items": {
|
89
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
90
|
-
}
|
91
|
-
}
|
92
|
-
},
|
93
|
-
{
|
94
|
-
"name": "baseUrl",
|
95
|
-
"summary": "Server address",
|
96
|
-
"required": false,
|
97
|
-
"description": "Address of the Vespa server",
|
98
|
-
"schema": {
|
99
|
-
"type": "string"
|
100
|
-
}
|
101
|
-
},
|
102
|
-
{
|
103
|
-
"name": "collection",
|
104
|
-
"summary": "Collection name",
|
105
|
-
"required": false,
|
106
|
-
"description": "Name of the collection",
|
107
|
-
"schema": {
|
108
|
-
"type": "string"
|
109
|
-
}
|
110
|
-
},
|
111
|
-
{
|
112
|
-
"name": "limit",
|
113
|
-
"summary": "Limit",
|
114
|
-
"required": false,
|
115
|
-
"description": "Maximum number of results",
|
116
|
-
"schema": {
|
117
|
-
"type": "number"
|
118
|
-
}
|
119
|
-
},
|
120
|
-
{
|
121
|
-
"name": "orderby",
|
122
|
-
"summary": "Ordered by",
|
123
|
-
"required": false,
|
124
|
-
"description": "Ordering of the results",
|
125
|
-
"schema": {
|
126
|
-
"type": "string"
|
127
|
-
}
|
128
|
-
},
|
129
|
-
{
|
130
|
-
"name": "targetHits",
|
131
|
-
"summary": "",
|
132
|
-
"required": false,
|
133
|
-
"description": "targetHits",
|
134
|
-
"schema": {
|
135
|
-
"type": "number"
|
136
|
-
}
|
137
|
-
},
|
138
|
-
{
|
139
|
-
"name": "filter",
|
140
|
-
"summary": "Filters",
|
141
|
-
"required": false,
|
142
|
-
"description": "Search filters",
|
143
|
-
"schema": {
|
144
|
-
"type": "string"
|
145
|
-
}
|
146
|
-
},
|
147
|
-
{
|
148
|
-
"name": "language",
|
149
|
-
"summary": "Language",
|
150
|
-
"required": true,
|
151
|
-
"description": "Search language",
|
152
|
-
"schema": {
|
153
|
-
"type": "string"
|
154
|
-
}
|
155
|
-
},
|
156
|
-
{
|
157
|
-
"name": "query",
|
158
|
-
"summary": "Text to search",
|
159
|
-
"required": true,
|
160
|
-
"description": "Semantic search query",
|
161
|
-
"schema": {
|
162
|
-
"type": "string"
|
163
|
-
}
|
164
|
-
}
|
165
|
-
],
|
166
|
-
"x-events": []
|
167
|
-
}
|
168
|
-
},
|
169
|
-
"/textSplitter": {
|
170
|
-
"post": {
|
171
|
-
"tags": ["service"],
|
172
|
-
"summary": "Text splitting",
|
173
|
-
"description": "Splits the text into pieces",
|
174
|
-
"parameters": [
|
175
|
-
{
|
176
|
-
"name": "size",
|
177
|
-
"summary": "Size",
|
178
|
-
"required": false,
|
179
|
-
"description": "Size of the text pieces",
|
180
|
-
"schema": {
|
181
|
-
"type": "number"
|
182
|
-
}
|
183
|
-
},
|
184
|
-
{
|
185
|
-
"name": "overlap",
|
186
|
-
"summary": "Tolerance",
|
187
|
-
"required": false,
|
188
|
-
"description": "Size difference tolerance to fit the text",
|
189
|
-
"schema": {
|
190
|
-
"type": "number"
|
191
|
-
}
|
192
|
-
},
|
193
|
-
{
|
194
|
-
"name": "source",
|
195
|
-
"summary": "Source",
|
196
|
-
"required": true,
|
197
|
-
"description": "Metadata indicating the source of the data",
|
198
|
-
"schema": {
|
199
|
-
"type": "string"
|
200
|
-
}
|
201
|
-
},
|
202
|
-
{
|
203
|
-
"name": "text",
|
204
|
-
"summary": "Text",
|
205
|
-
"required": true,
|
206
|
-
"description": "Text to split",
|
207
|
-
"schema": {
|
208
|
-
"type": "string"
|
209
|
-
}
|
210
|
-
}
|
211
|
-
],
|
212
|
-
"x-events": []
|
213
|
-
}
|
214
|
-
},
|
215
|
-
"/push": {
|
216
|
-
"post": {
|
217
|
-
"tags": ["service"],
|
218
|
-
"summary": "Add documents",
|
219
|
-
"description": "Add documents",
|
220
|
-
"parameters": [
|
221
|
-
{
|
222
|
-
"name": "embeddings",
|
223
|
-
"summary": "Embeddings model",
|
224
|
-
"required": false,
|
225
|
-
"description": "Embeddings model",
|
226
|
-
"schema": {
|
227
|
-
"type": "array",
|
228
|
-
"items": {
|
229
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
230
|
-
}
|
231
|
-
}
|
232
|
-
},
|
233
|
-
{
|
234
|
-
"name": "baseUrl",
|
235
|
-
"summary": "Server address",
|
236
|
-
"required": false,
|
237
|
-
"description": "Address of the Vespa server",
|
238
|
-
"schema": {
|
239
|
-
"type": "string"
|
240
|
-
}
|
241
|
-
},
|
242
|
-
{
|
243
|
-
"name": "collection",
|
244
|
-
"summary": "Collection name",
|
245
|
-
"required": false,
|
246
|
-
"description": "Name of the collection to add documents to",
|
247
|
-
"schema": {
|
248
|
-
"type": "string"
|
249
|
-
}
|
250
|
-
},
|
251
|
-
{
|
252
|
-
"name": "documents",
|
253
|
-
"summary": "Documents",
|
254
|
-
"required": true,
|
255
|
-
"description": "List of documents to add",
|
256
|
-
"schema": {
|
257
|
-
"type": "array",
|
258
|
-
"items": {
|
259
|
-
"type": "object"
|
260
|
-
}
|
261
|
-
}
|
262
|
-
}
|
263
|
-
],
|
264
|
-
"x-events": []
|
265
|
-
}
|
266
|
-
},
|
267
|
-
"/remove": {
|
268
|
-
"post": {
|
269
|
-
"tags": ["service"],
|
270
|
-
"summary": "Delete",
|
271
|
-
"description": "Delete documents from the database.",
|
272
|
-
"parameters": [
|
273
|
-
{
|
274
|
-
"name": "baseUrl",
|
275
|
-
"summary": "Server address",
|
276
|
-
"required": false,
|
277
|
-
"description": "Address of the Vespa server",
|
278
|
-
"schema": {
|
279
|
-
"type": "string"
|
280
|
-
}
|
281
|
-
},
|
282
|
-
{
|
283
|
-
"name": "collection",
|
284
|
-
"summary": "Collection name",
|
285
|
-
"required": false,
|
286
|
-
"description": "Name of the collection to delete documents from",
|
287
|
-
"schema": {
|
288
|
-
"type": "string"
|
289
|
-
}
|
290
|
-
},
|
291
|
-
{
|
292
|
-
"name": "selection",
|
293
|
-
"summary": "Selection",
|
294
|
-
"required": true,
|
295
|
-
"description": "Filter corresponding to the documents to delete",
|
296
|
-
"schema": {
|
297
|
-
"type": "string"
|
298
|
-
}
|
299
|
-
}
|
300
|
-
],
|
301
|
-
"x-events": []
|
302
|
-
}
|
303
|
-
}
|
304
|
-
},
|
305
|
-
"components": {
|
306
|
-
"schemas": {}
|
307
|
-
}
|
308
|
-
}
|