@takeshape/schema 11.10.0 → 11.13.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.
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
"service": "openai",
|
|
184
184
|
"model": "gpt-3.5-turbo",
|
|
185
185
|
"systemPrompt": "You are a helpful assistant.",
|
|
186
|
-
"inputTemplate": "Answer the following question:\n{$args.input} \n\nby using the following text:\n{$
|
|
186
|
+
"inputTemplate": "Answer the following question:\n{$args.input} \n\nby using the following text:\n{$resultsById.getRelatedProductList.title} {$resultsById.getRelatedProductList.description}"
|
|
187
187
|
}
|
|
188
188
|
]
|
|
189
189
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"projectId": "2ccc7a6a-6e62-44dc-a149-58a7ee239846",
|
|
3
3
|
"defaultLocale": "en-us",
|
|
4
|
-
"locales": [
|
|
4
|
+
"locales": [
|
|
5
|
+
"en-us"
|
|
6
|
+
],
|
|
5
7
|
"queries": {
|
|
6
8
|
"getRelatedProductList": {
|
|
7
9
|
"shape": "PaginatedList<shopify:Product>",
|
|
@@ -12,7 +14,14 @@
|
|
|
12
14
|
"id": "createEmbedding",
|
|
13
15
|
"service": "openai",
|
|
14
16
|
"model": "text-embedding-3-small",
|
|
15
|
-
"args": {
|
|
17
|
+
"args": {
|
|
18
|
+
"ops": [
|
|
19
|
+
{
|
|
20
|
+
"path": "input",
|
|
21
|
+
"mapping": "$args.text"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
16
25
|
},
|
|
17
26
|
{
|
|
18
27
|
"shapeName": "Shopify_Product",
|
|
@@ -20,12 +29,18 @@
|
|
|
20
29
|
"service": "takeshape",
|
|
21
30
|
"args": {
|
|
22
31
|
"ops": [
|
|
23
|
-
{
|
|
32
|
+
{
|
|
33
|
+
"path": "vector.name",
|
|
34
|
+
"value": "vector"
|
|
35
|
+
},
|
|
24
36
|
{
|
|
25
37
|
"path": "vector.value",
|
|
26
38
|
"mapping": "$resolvers.createEmbedding"
|
|
27
39
|
},
|
|
28
|
-
{
|
|
40
|
+
{
|
|
41
|
+
"path": "size",
|
|
42
|
+
"mapping": "$args.size"
|
|
43
|
+
}
|
|
29
44
|
]
|
|
30
45
|
}
|
|
31
46
|
}
|
|
@@ -33,8 +48,17 @@
|
|
|
33
48
|
},
|
|
34
49
|
"args": {
|
|
35
50
|
"type": "object",
|
|
36
|
-
"properties": {
|
|
37
|
-
|
|
51
|
+
"properties": {
|
|
52
|
+
"text": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
},
|
|
55
|
+
"size": {
|
|
56
|
+
"type": "integer"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"required": [
|
|
60
|
+
"text"
|
|
61
|
+
]
|
|
38
62
|
}
|
|
39
63
|
},
|
|
40
64
|
"getIndexedShopifyProductList": {
|
|
@@ -43,7 +67,9 @@
|
|
|
43
67
|
"shapeName": "Shopify_Product",
|
|
44
68
|
"name": "takeshape:queryApiIndex",
|
|
45
69
|
"service": "takeshape",
|
|
46
|
-
"options": {
|
|
70
|
+
"options": {
|
|
71
|
+
"indexedShape": "Shopify_Product"
|
|
72
|
+
}
|
|
47
73
|
},
|
|
48
74
|
"description": "Fetch Shopify_Product data from the API Index.",
|
|
49
75
|
"args": "TSListArgs<Shopify_Product>"
|
|
@@ -111,7 +137,9 @@
|
|
|
111
137
|
"description": "The ID of the Product to return."
|
|
112
138
|
}
|
|
113
139
|
},
|
|
114
|
-
"required": [
|
|
140
|
+
"required": [
|
|
141
|
+
"id"
|
|
142
|
+
]
|
|
115
143
|
},
|
|
116
144
|
"shape": "Shopify_Product"
|
|
117
145
|
}
|
|
@@ -126,15 +154,28 @@
|
|
|
126
154
|
"name": "delegate",
|
|
127
155
|
"id": "getRelatedProductList",
|
|
128
156
|
"to": "local:Query.getRelatedProductList",
|
|
129
|
-
"options": {
|
|
157
|
+
"options": {
|
|
158
|
+
"selectionSet": "{ items {title description} }"
|
|
159
|
+
},
|
|
130
160
|
"args": {
|
|
131
161
|
"ops": [
|
|
132
|
-
{
|
|
133
|
-
|
|
162
|
+
{
|
|
163
|
+
"path": "text",
|
|
164
|
+
"mapping": "$args.input"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"path": "size",
|
|
168
|
+
"value": "1"
|
|
169
|
+
}
|
|
134
170
|
]
|
|
135
171
|
},
|
|
136
172
|
"results": {
|
|
137
|
-
"ops": [
|
|
173
|
+
"ops": [
|
|
174
|
+
{
|
|
175
|
+
"path": "$",
|
|
176
|
+
"mapping": "$currentResolver.items[0]"
|
|
177
|
+
}
|
|
178
|
+
]
|
|
138
179
|
}
|
|
139
180
|
},
|
|
140
181
|
{
|
|
@@ -142,7 +183,7 @@
|
|
|
142
183
|
"service": "openai",
|
|
143
184
|
"model": "gpt-3.5-turbo",
|
|
144
185
|
"systemPrompt": "You are a helpful assistant.",
|
|
145
|
-
"inputTemplate": "Answer the following question:\n{$args.input} \n\nby using the following text:\n{$
|
|
186
|
+
"inputTemplate": "Answer the following question:\n{$args.input} \n\nby using the following text:\n{$resultsById.getRelatedProductList.title} {$resultsById.getRelatedProductList.description}"
|
|
146
187
|
}
|
|
147
188
|
]
|
|
148
189
|
}
|
|
@@ -156,29 +197,47 @@
|
|
|
156
197
|
"cache": {
|
|
157
198
|
"enabled": true,
|
|
158
199
|
"triggers": [
|
|
159
|
-
{
|
|
200
|
+
{
|
|
201
|
+
"type": "schedule",
|
|
202
|
+
"loader": "list",
|
|
203
|
+
"interval": 1440
|
|
204
|
+
},
|
|
160
205
|
{
|
|
161
206
|
"type": "webhook",
|
|
162
207
|
"loader": "get",
|
|
163
208
|
"service": "shopify",
|
|
164
|
-
"events": [
|
|
209
|
+
"events": [
|
|
210
|
+
"products/create",
|
|
211
|
+
"products/update",
|
|
212
|
+
"products/delete"
|
|
213
|
+
]
|
|
165
214
|
}
|
|
166
215
|
],
|
|
167
|
-
"fragment": {
|
|
216
|
+
"fragment": {
|
|
217
|
+
"maxDepth": 2
|
|
218
|
+
}
|
|
168
219
|
},
|
|
169
220
|
"loaders": {
|
|
170
|
-
"list": {
|
|
171
|
-
|
|
221
|
+
"list": {
|
|
222
|
+
"query": "shopify:Query.products"
|
|
223
|
+
},
|
|
224
|
+
"get": {
|
|
225
|
+
"query": "shopify:Query.product"
|
|
226
|
+
}
|
|
172
227
|
},
|
|
173
228
|
"schema": {
|
|
174
229
|
"extends": [
|
|
175
|
-
{
|
|
230
|
+
{
|
|
231
|
+
"@ref": "shopify:Product"
|
|
232
|
+
},
|
|
176
233
|
{
|
|
177
234
|
"type": "object",
|
|
178
235
|
"properties": {
|
|
179
236
|
"vector": {
|
|
180
237
|
"type": "array",
|
|
181
|
-
"items": {
|
|
238
|
+
"items": {
|
|
239
|
+
"type": "number"
|
|
240
|
+
},
|
|
182
241
|
"title": "Vector",
|
|
183
242
|
"@tag": "vector",
|
|
184
243
|
"@dependencies": "{title description}",
|
|
@@ -186,7 +245,9 @@
|
|
|
186
245
|
"name": "ai:createEmbedding",
|
|
187
246
|
"service": "openai",
|
|
188
247
|
"model": "text-embedding-3-small",
|
|
189
|
-
"options": {
|
|
248
|
+
"options": {
|
|
249
|
+
"useDependencies": true
|
|
250
|
+
}
|
|
190
251
|
}
|
|
191
252
|
}
|
|
192
253
|
}
|
|
@@ -232,7 +293,9 @@
|
|
|
232
293
|
"options": {
|
|
233
294
|
"endpoint": "https://api.anthropic.com/v1",
|
|
234
295
|
"spec": "https://raw.githubusercontent.com/takeshape/openapi-specs/d1219888103fdd900138589e4e03c0b216c0a5d1/specs/anthropic/2023-06-01.yml",
|
|
235
|
-
"headers": {
|
|
296
|
+
"headers": {
|
|
297
|
+
"anthropic-version": "2023-06-01"
|
|
298
|
+
},
|
|
236
299
|
"transformVersion": "2.0.0",
|
|
237
300
|
"introspectedAt": "2024-08-21T16:55:43.579Z"
|
|
238
301
|
}
|
|
@@ -253,4 +316,4 @@
|
|
|
253
316
|
},
|
|
254
317
|
"schemaVersion": "3.44.0",
|
|
255
318
|
"apiVersion": "2"
|
|
256
|
-
}
|
|
319
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takeshape/schema",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.13.0",
|
|
4
4
|
"description": "TakeShape Schema",
|
|
5
5
|
"homepage": "https://www.takeshape.io",
|
|
6
6
|
"repository": {
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"p-reduce": "^2.1.0",
|
|
29
29
|
"semver": "^7.3.2",
|
|
30
30
|
"tiny-invariant": "^1.2.0",
|
|
31
|
-
"@takeshape/errors": "11.
|
|
32
|
-
"@takeshape/json-schema": "11.
|
|
33
|
-
"@takeshape/util": "11.
|
|
31
|
+
"@takeshape/errors": "11.13.0",
|
|
32
|
+
"@takeshape/json-schema": "11.13.0",
|
|
33
|
+
"@takeshape/util": "11.13.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@takeshape/json-schema-to-typescript": "^11.0.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"meow": "^9.0.0",
|
|
47
47
|
"p-map": "^5.0.0",
|
|
48
48
|
"shortid": "^2.2.15",
|
|
49
|
-
"@takeshape/infra": "11.
|
|
49
|
+
"@takeshape/infra": "11.13.0"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
52
52
|
"node": ">=20"
|