@botpress/zai 1.1.0 → 1.2.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/README.md +1 -1
- package/build.ts +9 -0
- package/dist/adapters/botpress-table.js +21 -21
- package/dist/index.d.ts +22 -521
- package/dist/operations/check.js +15 -3
- package/dist/operations/extract.js +28 -8
- package/dist/operations/filter.js +15 -3
- package/dist/operations/label.js +15 -3
- package/dist/operations/rewrite.js +18 -6
- package/dist/operations/summarize.js +6 -5
- package/dist/operations/text.js +4 -3
- package/dist/utils.js +0 -6
- package/dist/zai.js +28 -68
- package/e2e/data/cache.jsonl +107 -0
- package/{src/operations/__tests/index.ts → e2e/utils.ts} +18 -16
- package/package.json +23 -21
- package/src/adapters/adapter.ts +2 -2
- package/src/adapters/botpress-table.ts +36 -36
- package/src/adapters/memory.ts +3 -3
- package/src/operations/check.ts +31 -17
- package/src/operations/errors.ts +1 -1
- package/src/operations/extract.ts +49 -31
- package/src/operations/filter.ts +36 -23
- package/src/operations/label.ts +32 -19
- package/src/operations/rewrite.ts +28 -15
- package/src/operations/summarize.ts +11 -9
- package/src/operations/text.ts +7 -5
- package/src/utils.ts +5 -14
- package/src/zai.ts +45 -91
- package/tsconfig.json +2 -22
- package/dist/models.js +0 -387
- package/src/models.ts +0 -394
- package/src/operations/__tests/cache.jsonl +0 -101
- package/src/sdk-interfaces/llm/generateContent.ts +0 -127
- package/src/sdk-interfaces/llm/listLanguageModels.ts +0 -19
- /package/{src/operations/__tests → e2e/data}/botpress_docs.txt +0 -0
package/dist/models.js
DELETED
|
@@ -1,387 +0,0 @@
|
|
|
1
|
-
export const Models = [
|
|
2
|
-
{
|
|
3
|
-
"id": "anthropic__claude-3-haiku-20240307",
|
|
4
|
-
"name": "Claude 3 Haiku",
|
|
5
|
-
"integration": "anthropic",
|
|
6
|
-
"input": {
|
|
7
|
-
"maxTokens": 2e5
|
|
8
|
-
},
|
|
9
|
-
"output": {
|
|
10
|
-
"maxTokens": 4096
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"id": "anthropic__claude-3-5-sonnet-20240620",
|
|
15
|
-
"name": "Claude 3.5 Sonnet",
|
|
16
|
-
"integration": "anthropic",
|
|
17
|
-
"input": {
|
|
18
|
-
"maxTokens": 2e5
|
|
19
|
-
},
|
|
20
|
-
"output": {
|
|
21
|
-
"maxTokens": 4096
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"id": "cerebras__llama3.1-70b",
|
|
26
|
-
"name": "Llama 3.1 70B",
|
|
27
|
-
"integration": "cerebras",
|
|
28
|
-
"input": {
|
|
29
|
-
"maxTokens": 8192
|
|
30
|
-
},
|
|
31
|
-
"output": {
|
|
32
|
-
"maxTokens": 8192
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"id": "cerebras__llama3.1-8b",
|
|
37
|
-
"name": "Llama 3.1 8B",
|
|
38
|
-
"integration": "cerebras",
|
|
39
|
-
"input": {
|
|
40
|
-
"maxTokens": 8192
|
|
41
|
-
},
|
|
42
|
-
"output": {
|
|
43
|
-
"maxTokens": 8192
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"id": "fireworks-ai__accounts/fireworks/models/deepseek-coder-v2-instruct",
|
|
48
|
-
"name": "DeepSeek Coder V2 Instruct",
|
|
49
|
-
"integration": "fireworks-ai",
|
|
50
|
-
"input": {
|
|
51
|
-
"maxTokens": 131072
|
|
52
|
-
},
|
|
53
|
-
"output": {
|
|
54
|
-
"maxTokens": 131072
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"id": "fireworks-ai__accounts/fireworks/models/deepseek-coder-v2-lite-instruct",
|
|
59
|
-
"name": "DeepSeek Coder V2 Lite",
|
|
60
|
-
"integration": "fireworks-ai",
|
|
61
|
-
"input": {
|
|
62
|
-
"maxTokens": 163840
|
|
63
|
-
},
|
|
64
|
-
"output": {
|
|
65
|
-
"maxTokens": 163840
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"id": "fireworks-ai__accounts/fireworks/models/firellava-13b",
|
|
70
|
-
"name": "FireLLaVA-13B",
|
|
71
|
-
"integration": "fireworks-ai",
|
|
72
|
-
"input": {
|
|
73
|
-
"maxTokens": 4096
|
|
74
|
-
},
|
|
75
|
-
"output": {
|
|
76
|
-
"maxTokens": 4096
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"id": "fireworks-ai__accounts/fireworks/models/firefunction-v2",
|
|
81
|
-
"name": "Firefunction V2",
|
|
82
|
-
"integration": "fireworks-ai",
|
|
83
|
-
"input": {
|
|
84
|
-
"maxTokens": 8192
|
|
85
|
-
},
|
|
86
|
-
"output": {
|
|
87
|
-
"maxTokens": 8192
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"id": "fireworks-ai__accounts/fireworks/models/gemma2-9b-it",
|
|
92
|
-
"name": "Gemma 2 9B Instruct",
|
|
93
|
-
"integration": "fireworks-ai",
|
|
94
|
-
"input": {
|
|
95
|
-
"maxTokens": 8192
|
|
96
|
-
},
|
|
97
|
-
"output": {
|
|
98
|
-
"maxTokens": 8192
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"id": "fireworks-ai__accounts/fireworks/models/llama-v3p1-405b-instruct",
|
|
103
|
-
"name": "Llama 3.1 405B Instruct",
|
|
104
|
-
"integration": "fireworks-ai",
|
|
105
|
-
"input": {
|
|
106
|
-
"maxTokens": 131072
|
|
107
|
-
},
|
|
108
|
-
"output": {
|
|
109
|
-
"maxTokens": 131072
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"id": "fireworks-ai__accounts/fireworks/models/llama-v3p1-70b-instruct",
|
|
114
|
-
"name": "Llama 3.1 70B Instruct",
|
|
115
|
-
"integration": "fireworks-ai",
|
|
116
|
-
"input": {
|
|
117
|
-
"maxTokens": 131072
|
|
118
|
-
},
|
|
119
|
-
"output": {
|
|
120
|
-
"maxTokens": 131072
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"id": "fireworks-ai__accounts/fireworks/models/llama-v3p1-8b-instruct",
|
|
125
|
-
"name": "Llama 3.1 8B Instruct",
|
|
126
|
-
"integration": "fireworks-ai",
|
|
127
|
-
"input": {
|
|
128
|
-
"maxTokens": 131072
|
|
129
|
-
},
|
|
130
|
-
"output": {
|
|
131
|
-
"maxTokens": 131072
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"id": "fireworks-ai__accounts/fireworks/models/mixtral-8x22b-instruct",
|
|
136
|
-
"name": "Mixtral MoE 8x22B Instruct",
|
|
137
|
-
"integration": "fireworks-ai",
|
|
138
|
-
"input": {
|
|
139
|
-
"maxTokens": 65536
|
|
140
|
-
},
|
|
141
|
-
"output": {
|
|
142
|
-
"maxTokens": 65536
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"id": "fireworks-ai__accounts/fireworks/models/mixtral-8x7b-instruct",
|
|
147
|
-
"name": "Mixtral MoE 8x7B Instruct",
|
|
148
|
-
"integration": "fireworks-ai",
|
|
149
|
-
"input": {
|
|
150
|
-
"maxTokens": 32768
|
|
151
|
-
},
|
|
152
|
-
"output": {
|
|
153
|
-
"maxTokens": 32768
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
"id": "fireworks-ai__accounts/fireworks/models/mythomax-l2-13b",
|
|
158
|
-
"name": "MythoMax L2 13b",
|
|
159
|
-
"integration": "fireworks-ai",
|
|
160
|
-
"input": {
|
|
161
|
-
"maxTokens": 4096
|
|
162
|
-
},
|
|
163
|
-
"output": {
|
|
164
|
-
"maxTokens": 4096
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"id": "fireworks-ai__accounts/fireworks/models/qwen2-72b-instruct",
|
|
169
|
-
"name": "Qwen2 72b Instruct",
|
|
170
|
-
"integration": "fireworks-ai",
|
|
171
|
-
"input": {
|
|
172
|
-
"maxTokens": 32768
|
|
173
|
-
},
|
|
174
|
-
"output": {
|
|
175
|
-
"maxTokens": 32768
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
"id": "groq__gemma2-9b-it",
|
|
180
|
-
"name": "Gemma2 9B",
|
|
181
|
-
"integration": "groq",
|
|
182
|
-
"input": {
|
|
183
|
-
"maxTokens": 8192
|
|
184
|
-
},
|
|
185
|
-
"output": {
|
|
186
|
-
"maxTokens": 8192
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"id": "groq__llama3-70b-8192",
|
|
191
|
-
"name": "LLaMA 3 70B",
|
|
192
|
-
"integration": "groq",
|
|
193
|
-
"input": {
|
|
194
|
-
"maxTokens": 8192
|
|
195
|
-
},
|
|
196
|
-
"output": {
|
|
197
|
-
"maxTokens": 8192
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
"id": "groq__llama3-8b-8192",
|
|
202
|
-
"name": "LLaMA 3 8B",
|
|
203
|
-
"integration": "groq",
|
|
204
|
-
"input": {
|
|
205
|
-
"maxTokens": 8192
|
|
206
|
-
},
|
|
207
|
-
"output": {
|
|
208
|
-
"maxTokens": 8192
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
"id": "groq__llama-3.1-70b-versatile",
|
|
213
|
-
"name": "LLaMA 3.1 70B",
|
|
214
|
-
"integration": "groq",
|
|
215
|
-
"input": {
|
|
216
|
-
"maxTokens": 128e3
|
|
217
|
-
},
|
|
218
|
-
"output": {
|
|
219
|
-
"maxTokens": 8192
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
"id": "groq__llama-3.1-8b-instant",
|
|
224
|
-
"name": "LLaMA 3.1 8B",
|
|
225
|
-
"integration": "groq",
|
|
226
|
-
"input": {
|
|
227
|
-
"maxTokens": 128e3
|
|
228
|
-
},
|
|
229
|
-
"output": {
|
|
230
|
-
"maxTokens": 8192
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
"id": "groq__llama-3.2-11b-vision-preview",
|
|
235
|
-
"name": "LLaMA 3.2 11B Vision",
|
|
236
|
-
"integration": "groq",
|
|
237
|
-
"input": {
|
|
238
|
-
"maxTokens": 128e3
|
|
239
|
-
},
|
|
240
|
-
"output": {
|
|
241
|
-
"maxTokens": 8192
|
|
242
|
-
}
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
"id": "groq__llama-3.2-1b-preview",
|
|
246
|
-
"name": "LLaMA 3.2 1B",
|
|
247
|
-
"integration": "groq",
|
|
248
|
-
"input": {
|
|
249
|
-
"maxTokens": 128e3
|
|
250
|
-
},
|
|
251
|
-
"output": {
|
|
252
|
-
"maxTokens": 8192
|
|
253
|
-
}
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
"id": "groq__llama-3.2-3b-preview",
|
|
257
|
-
"name": "LLaMA 3.2 3B",
|
|
258
|
-
"integration": "groq",
|
|
259
|
-
"input": {
|
|
260
|
-
"maxTokens": 128e3
|
|
261
|
-
},
|
|
262
|
-
"output": {
|
|
263
|
-
"maxTokens": 8192
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
"id": "groq__llama-3.2-90b-vision-preview",
|
|
268
|
-
"name": "LLaMA 3.2 90B Vision",
|
|
269
|
-
"integration": "groq",
|
|
270
|
-
"input": {
|
|
271
|
-
"maxTokens": 128e3
|
|
272
|
-
},
|
|
273
|
-
"output": {
|
|
274
|
-
"maxTokens": 8192
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
"id": "groq__llama-3.3-70b-versatile",
|
|
279
|
-
"name": "LLaMA 3.3 70B",
|
|
280
|
-
"integration": "groq",
|
|
281
|
-
"input": {
|
|
282
|
-
"maxTokens": 128e3
|
|
283
|
-
},
|
|
284
|
-
"output": {
|
|
285
|
-
"maxTokens": 32768
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
"id": "groq__mixtral-8x7b-32768",
|
|
290
|
-
"name": "Mixtral 8x7B",
|
|
291
|
-
"integration": "groq",
|
|
292
|
-
"input": {
|
|
293
|
-
"maxTokens": 32768
|
|
294
|
-
},
|
|
295
|
-
"output": {
|
|
296
|
-
"maxTokens": 32768
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
"id": "openai__o1-2024-12-17",
|
|
301
|
-
"name": "GPT o1",
|
|
302
|
-
"integration": "openai",
|
|
303
|
-
"input": {
|
|
304
|
-
"maxTokens": 2e5
|
|
305
|
-
},
|
|
306
|
-
"output": {
|
|
307
|
-
"maxTokens": 1e5
|
|
308
|
-
}
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
"id": "openai__o1-mini-2024-09-12",
|
|
312
|
-
"name": "GPT o1-mini",
|
|
313
|
-
"integration": "openai",
|
|
314
|
-
"input": {
|
|
315
|
-
"maxTokens": 128e3
|
|
316
|
-
},
|
|
317
|
-
"output": {
|
|
318
|
-
"maxTokens": 65536
|
|
319
|
-
}
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
"id": "openai__gpt-3.5-turbo-0125",
|
|
323
|
-
"name": "GPT-3.5 Turbo",
|
|
324
|
-
"integration": "openai",
|
|
325
|
-
"input": {
|
|
326
|
-
"maxTokens": 128e3
|
|
327
|
-
},
|
|
328
|
-
"output": {
|
|
329
|
-
"maxTokens": 4096
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
"id": "openai__gpt-4-turbo-2024-04-09",
|
|
334
|
-
"name": "GPT-4 Turbo",
|
|
335
|
-
"integration": "openai",
|
|
336
|
-
"input": {
|
|
337
|
-
"maxTokens": 128e3
|
|
338
|
-
},
|
|
339
|
-
"output": {
|
|
340
|
-
"maxTokens": 4096
|
|
341
|
-
}
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
"id": "openai__gpt-4o-2024-08-06",
|
|
345
|
-
"name": "GPT-4o (August 2024)",
|
|
346
|
-
"integration": "openai",
|
|
347
|
-
"input": {
|
|
348
|
-
"maxTokens": 128e3
|
|
349
|
-
},
|
|
350
|
-
"output": {
|
|
351
|
-
"maxTokens": 16384
|
|
352
|
-
}
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
"id": "openai__gpt-4o-2024-05-13",
|
|
356
|
-
"name": "GPT-4o (May 2024)",
|
|
357
|
-
"integration": "openai",
|
|
358
|
-
"input": {
|
|
359
|
-
"maxTokens": 128e3
|
|
360
|
-
},
|
|
361
|
-
"output": {
|
|
362
|
-
"maxTokens": 4096
|
|
363
|
-
}
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
"id": "openai__gpt-4o-2024-11-20",
|
|
367
|
-
"name": "GPT-4o (November 2024)",
|
|
368
|
-
"integration": "openai",
|
|
369
|
-
"input": {
|
|
370
|
-
"maxTokens": 128e3
|
|
371
|
-
},
|
|
372
|
-
"output": {
|
|
373
|
-
"maxTokens": 16384
|
|
374
|
-
}
|
|
375
|
-
},
|
|
376
|
-
{
|
|
377
|
-
"id": "openai__gpt-4o-mini-2024-07-18",
|
|
378
|
-
"name": "GPT-4o Mini",
|
|
379
|
-
"integration": "openai",
|
|
380
|
-
"input": {
|
|
381
|
-
"maxTokens": 128e3
|
|
382
|
-
},
|
|
383
|
-
"output": {
|
|
384
|
-
"maxTokens": 16384
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
];
|