@ai-sdk/llamaindex 3.0.0-beta.9 → 3.0.0-beta.91
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/CHANGELOG.md +555 -0
- package/dist/index.js +4 -31
- package/dist/index.js.map +1 -1
- package/package.json +5 -7
- package/dist/index.d.mts +0 -22
- package/dist/index.mjs +0 -63
- package/dist/index.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,560 @@
|
|
|
1
1
|
# @ai-sdk/llamaindex
|
|
2
2
|
|
|
3
|
+
## 3.0.0-beta.91
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ai@7.0.0-beta.91
|
|
8
|
+
|
|
9
|
+
## 3.0.0-beta.90
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [1db29c8]
|
|
14
|
+
- ai@7.0.0-beta.90
|
|
15
|
+
|
|
16
|
+
## 3.0.0-beta.89
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [ff5eba1]
|
|
21
|
+
- ai@7.0.0-beta.89
|
|
22
|
+
|
|
23
|
+
## 3.0.0-beta.88
|
|
24
|
+
|
|
25
|
+
### Major Changes
|
|
26
|
+
|
|
27
|
+
- ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [ef992f8]
|
|
32
|
+
- ai@7.0.0-beta.88
|
|
33
|
+
|
|
34
|
+
## 3.0.0-beta.87
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- ai@7.0.0-beta.87
|
|
39
|
+
|
|
40
|
+
## 3.0.0-beta.86
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- Updated dependencies [5a6f514]
|
|
45
|
+
- ai@7.0.0-beta.86
|
|
46
|
+
|
|
47
|
+
## 3.0.0-beta.85
|
|
48
|
+
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- Updated dependencies [57bf606]
|
|
52
|
+
- ai@7.0.0-beta.85
|
|
53
|
+
|
|
54
|
+
## 3.0.0-beta.84
|
|
55
|
+
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- Updated dependencies [90e2d8a]
|
|
59
|
+
- ai@7.0.0-beta.84
|
|
60
|
+
|
|
61
|
+
## 3.0.0-beta.83
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- ai@7.0.0-beta.83
|
|
66
|
+
|
|
67
|
+
## 3.0.0-beta.82
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- Updated dependencies [e27ed76]
|
|
72
|
+
- ai@7.0.0-beta.82
|
|
73
|
+
|
|
74
|
+
## 3.0.0-beta.81
|
|
75
|
+
|
|
76
|
+
### Patch Changes
|
|
77
|
+
|
|
78
|
+
- Updated dependencies [2fe1099]
|
|
79
|
+
- Updated dependencies [f04adcb]
|
|
80
|
+
- ai@7.0.0-beta.81
|
|
81
|
+
|
|
82
|
+
## 3.0.0-beta.80
|
|
83
|
+
|
|
84
|
+
### Patch Changes
|
|
85
|
+
|
|
86
|
+
- Updated dependencies [3ae1786]
|
|
87
|
+
- ai@7.0.0-beta.80
|
|
88
|
+
|
|
89
|
+
## 3.0.0-beta.79
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- Updated dependencies [6866afe]
|
|
94
|
+
- ai@7.0.0-beta.79
|
|
95
|
+
|
|
96
|
+
## 3.0.0-beta.78
|
|
97
|
+
|
|
98
|
+
### Patch Changes
|
|
99
|
+
|
|
100
|
+
- Updated dependencies [f372547]
|
|
101
|
+
- ai@7.0.0-beta.78
|
|
102
|
+
|
|
103
|
+
## 3.0.0-beta.77
|
|
104
|
+
|
|
105
|
+
### Patch Changes
|
|
106
|
+
|
|
107
|
+
- Updated dependencies [2add429]
|
|
108
|
+
- ai@7.0.0-beta.77
|
|
109
|
+
|
|
110
|
+
## 3.0.0-beta.76
|
|
111
|
+
|
|
112
|
+
### Patch Changes
|
|
113
|
+
|
|
114
|
+
- Updated dependencies [fcc6869]
|
|
115
|
+
- ai@7.0.0-beta.76
|
|
116
|
+
|
|
117
|
+
## 3.0.0-beta.75
|
|
118
|
+
|
|
119
|
+
### Patch Changes
|
|
120
|
+
|
|
121
|
+
- Updated dependencies [176466a]
|
|
122
|
+
- ai@7.0.0-beta.75
|
|
123
|
+
|
|
124
|
+
## 3.0.0-beta.74
|
|
125
|
+
|
|
126
|
+
### Patch Changes
|
|
127
|
+
|
|
128
|
+
- Updated dependencies [e311194]
|
|
129
|
+
- ai@7.0.0-beta.74
|
|
130
|
+
|
|
131
|
+
## 3.0.0-beta.73
|
|
132
|
+
|
|
133
|
+
### Patch Changes
|
|
134
|
+
|
|
135
|
+
- ai@7.0.0-beta.73
|
|
136
|
+
|
|
137
|
+
## 3.0.0-beta.72
|
|
138
|
+
|
|
139
|
+
### Patch Changes
|
|
140
|
+
|
|
141
|
+
- Updated dependencies [664a0eb]
|
|
142
|
+
- ai@7.0.0-beta.72
|
|
143
|
+
|
|
144
|
+
## 3.0.0-beta.71
|
|
145
|
+
|
|
146
|
+
### Patch Changes
|
|
147
|
+
|
|
148
|
+
- Updated dependencies [e68be55]
|
|
149
|
+
- ai@7.0.0-beta.71
|
|
150
|
+
|
|
151
|
+
## 3.0.0-beta.70
|
|
152
|
+
|
|
153
|
+
### Patch Changes
|
|
154
|
+
|
|
155
|
+
- ai@7.0.0-beta.70
|
|
156
|
+
|
|
157
|
+
## 3.0.0-beta.69
|
|
158
|
+
|
|
159
|
+
### Patch Changes
|
|
160
|
+
|
|
161
|
+
- Updated dependencies [34bd95d]
|
|
162
|
+
- Updated dependencies [008271d]
|
|
163
|
+
- Updated dependencies [72223e7]
|
|
164
|
+
- ai@7.0.0-beta.69
|
|
165
|
+
|
|
166
|
+
## 3.0.0-beta.68
|
|
167
|
+
|
|
168
|
+
### Patch Changes
|
|
169
|
+
|
|
170
|
+
- Updated dependencies [b0c2869]
|
|
171
|
+
- Updated dependencies [7e26e81]
|
|
172
|
+
- ai@7.0.0-beta.68
|
|
173
|
+
|
|
174
|
+
## 3.0.0-beta.67
|
|
175
|
+
|
|
176
|
+
### Patch Changes
|
|
177
|
+
|
|
178
|
+
- Updated dependencies [d1a8bed]
|
|
179
|
+
- ai@7.0.0-beta.67
|
|
180
|
+
|
|
181
|
+
## 3.0.0-beta.66
|
|
182
|
+
|
|
183
|
+
### Patch Changes
|
|
184
|
+
|
|
185
|
+
- ai@7.0.0-beta.66
|
|
186
|
+
|
|
187
|
+
## 3.0.0-beta.65
|
|
188
|
+
|
|
189
|
+
### Patch Changes
|
|
190
|
+
|
|
191
|
+
- ai@7.0.0-beta.65
|
|
192
|
+
|
|
193
|
+
## 3.0.0-beta.64
|
|
194
|
+
|
|
195
|
+
### Patch Changes
|
|
196
|
+
|
|
197
|
+
- ai@7.0.0-beta.64
|
|
198
|
+
|
|
199
|
+
## 3.0.0-beta.63
|
|
200
|
+
|
|
201
|
+
### Patch Changes
|
|
202
|
+
|
|
203
|
+
- Updated dependencies [6fd51c0]
|
|
204
|
+
- ai@7.0.0-beta.63
|
|
205
|
+
|
|
206
|
+
## 3.0.0-beta.62
|
|
207
|
+
|
|
208
|
+
### Patch Changes
|
|
209
|
+
|
|
210
|
+
- ai@7.0.0-beta.62
|
|
211
|
+
|
|
212
|
+
## 3.0.0-beta.61
|
|
213
|
+
|
|
214
|
+
### Patch Changes
|
|
215
|
+
|
|
216
|
+
- Updated dependencies [c29a26f]
|
|
217
|
+
- ai@7.0.0-beta.61
|
|
218
|
+
|
|
219
|
+
## 3.0.0-beta.60
|
|
220
|
+
|
|
221
|
+
### Patch Changes
|
|
222
|
+
|
|
223
|
+
- Updated dependencies [38fc777]
|
|
224
|
+
- ai@7.0.0-beta.60
|
|
225
|
+
|
|
226
|
+
## 3.0.0-beta.59
|
|
227
|
+
|
|
228
|
+
### Patch Changes
|
|
229
|
+
|
|
230
|
+
- ai@7.0.0-beta.59
|
|
231
|
+
|
|
232
|
+
## 3.0.0-beta.58
|
|
233
|
+
|
|
234
|
+
### Patch Changes
|
|
235
|
+
|
|
236
|
+
- Updated dependencies [2e17091]
|
|
237
|
+
- ai@7.0.0-beta.58
|
|
238
|
+
|
|
239
|
+
## 3.0.0-beta.57
|
|
240
|
+
|
|
241
|
+
### Patch Changes
|
|
242
|
+
|
|
243
|
+
- Updated dependencies [986c6fd]
|
|
244
|
+
- Updated dependencies [493295c]
|
|
245
|
+
- ai@7.0.0-beta.57
|
|
246
|
+
|
|
247
|
+
## 3.0.0-beta.56
|
|
248
|
+
|
|
249
|
+
### Patch Changes
|
|
250
|
+
|
|
251
|
+
- ai@7.0.0-beta.56
|
|
252
|
+
|
|
253
|
+
## 3.0.0-beta.55
|
|
254
|
+
|
|
255
|
+
### Patch Changes
|
|
256
|
+
|
|
257
|
+
- Updated dependencies [b3c9f6a]
|
|
258
|
+
- ai@7.0.0-beta.55
|
|
259
|
+
|
|
260
|
+
## 3.0.0-beta.54
|
|
261
|
+
|
|
262
|
+
### Patch Changes
|
|
263
|
+
|
|
264
|
+
- Updated dependencies [5d0f18e]
|
|
265
|
+
- ai@7.0.0-beta.54
|
|
266
|
+
|
|
267
|
+
## 3.0.0-beta.53
|
|
268
|
+
|
|
269
|
+
### Patch Changes
|
|
270
|
+
|
|
271
|
+
- Updated dependencies [9b47dea]
|
|
272
|
+
- ai@7.0.0-beta.53
|
|
273
|
+
|
|
274
|
+
## 3.0.0-beta.52
|
|
275
|
+
|
|
276
|
+
### Patch Changes
|
|
277
|
+
|
|
278
|
+
- Updated dependencies [b56301c]
|
|
279
|
+
- ai@7.0.0-beta.52
|
|
280
|
+
|
|
281
|
+
## 3.0.0-beta.51
|
|
282
|
+
|
|
283
|
+
### Patch Changes
|
|
284
|
+
|
|
285
|
+
- Updated dependencies [6abd098]
|
|
286
|
+
- ai@7.0.0-beta.51
|
|
287
|
+
|
|
288
|
+
## 3.0.0-beta.50
|
|
289
|
+
|
|
290
|
+
### Patch Changes
|
|
291
|
+
|
|
292
|
+
- Updated dependencies [3debdb7]
|
|
293
|
+
- ai@7.0.0-beta.50
|
|
294
|
+
|
|
295
|
+
## 3.0.0-beta.49
|
|
296
|
+
|
|
297
|
+
### Patch Changes
|
|
298
|
+
|
|
299
|
+
- ai@7.0.0-beta.49
|
|
300
|
+
|
|
301
|
+
## 3.0.0-beta.48
|
|
302
|
+
|
|
303
|
+
### Patch Changes
|
|
304
|
+
|
|
305
|
+
- Updated dependencies [5c4d910]
|
|
306
|
+
- ai@7.0.0-beta.48
|
|
307
|
+
|
|
308
|
+
## 3.0.0-beta.47
|
|
309
|
+
|
|
310
|
+
### Patch Changes
|
|
311
|
+
|
|
312
|
+
- Updated dependencies [bc67b4f]
|
|
313
|
+
- ai@7.0.0-beta.47
|
|
314
|
+
|
|
315
|
+
## 3.0.0-beta.46
|
|
316
|
+
|
|
317
|
+
### Patch Changes
|
|
318
|
+
|
|
319
|
+
- Updated dependencies [31ee822]
|
|
320
|
+
- ai@7.0.0-beta.46
|
|
321
|
+
|
|
322
|
+
## 3.0.0-beta.45
|
|
323
|
+
|
|
324
|
+
### Patch Changes
|
|
325
|
+
|
|
326
|
+
- ai@7.0.0-beta.45
|
|
327
|
+
|
|
328
|
+
## 3.0.0-beta.44
|
|
329
|
+
|
|
330
|
+
### Patch Changes
|
|
331
|
+
|
|
332
|
+
- ai@7.0.0-beta.44
|
|
333
|
+
|
|
334
|
+
## 3.0.0-beta.43
|
|
335
|
+
|
|
336
|
+
### Patch Changes
|
|
337
|
+
|
|
338
|
+
- ai@7.0.0-beta.43
|
|
339
|
+
|
|
340
|
+
## 3.0.0-beta.42
|
|
341
|
+
|
|
342
|
+
### Patch Changes
|
|
343
|
+
|
|
344
|
+
- Updated dependencies [a3fd75b]
|
|
345
|
+
- ai@7.0.0-beta.42
|
|
346
|
+
|
|
347
|
+
## 3.0.0-beta.41
|
|
348
|
+
|
|
349
|
+
### Patch Changes
|
|
350
|
+
|
|
351
|
+
- ai@7.0.0-beta.41
|
|
352
|
+
|
|
353
|
+
## 3.0.0-beta.40
|
|
354
|
+
|
|
355
|
+
### Patch Changes
|
|
356
|
+
|
|
357
|
+
- Updated dependencies [989d3d2]
|
|
358
|
+
- ai@7.0.0-beta.40
|
|
359
|
+
|
|
360
|
+
## 3.0.0-beta.39
|
|
361
|
+
|
|
362
|
+
### Patch Changes
|
|
363
|
+
|
|
364
|
+
- Updated dependencies [f4cfccd]
|
|
365
|
+
- ai@7.0.0-beta.39
|
|
366
|
+
|
|
367
|
+
## 3.0.0-beta.38
|
|
368
|
+
|
|
369
|
+
### Patch Changes
|
|
370
|
+
|
|
371
|
+
- Updated dependencies [1f509d4]
|
|
372
|
+
- ai@7.0.0-beta.38
|
|
373
|
+
|
|
374
|
+
## 3.0.0-beta.37
|
|
375
|
+
|
|
376
|
+
### Patch Changes
|
|
377
|
+
|
|
378
|
+
- ai@7.0.0-beta.37
|
|
379
|
+
|
|
380
|
+
## 3.0.0-beta.36
|
|
381
|
+
|
|
382
|
+
### Patch Changes
|
|
383
|
+
|
|
384
|
+
- Updated dependencies [118b953]
|
|
385
|
+
- ai@7.0.0-beta.36
|
|
386
|
+
|
|
387
|
+
## 3.0.0-beta.35
|
|
388
|
+
|
|
389
|
+
### Patch Changes
|
|
390
|
+
|
|
391
|
+
- Updated dependencies [99bf941]
|
|
392
|
+
- ai@7.0.0-beta.35
|
|
393
|
+
|
|
394
|
+
## 3.0.0-beta.34
|
|
395
|
+
|
|
396
|
+
### Patch Changes
|
|
397
|
+
|
|
398
|
+
- ai@7.0.0-beta.34
|
|
399
|
+
|
|
400
|
+
## 3.0.0-beta.33
|
|
401
|
+
|
|
402
|
+
### Patch Changes
|
|
403
|
+
|
|
404
|
+
- Updated dependencies [caf1b6f]
|
|
405
|
+
- ai@7.0.0-beta.33
|
|
406
|
+
|
|
407
|
+
## 3.0.0-beta.32
|
|
408
|
+
|
|
409
|
+
### Patch Changes
|
|
410
|
+
|
|
411
|
+
- Updated dependencies [4b46062]
|
|
412
|
+
- ai@7.0.0-beta.32
|
|
413
|
+
|
|
414
|
+
## 3.0.0-beta.31
|
|
415
|
+
|
|
416
|
+
### Patch Changes
|
|
417
|
+
|
|
418
|
+
- Updated dependencies [e79e644]
|
|
419
|
+
- ai@7.0.0-beta.31
|
|
420
|
+
|
|
421
|
+
## 3.0.0-beta.30
|
|
422
|
+
|
|
423
|
+
### Patch Changes
|
|
424
|
+
|
|
425
|
+
- Updated dependencies [f5a6f89]
|
|
426
|
+
- ai@7.0.0-beta.30
|
|
427
|
+
|
|
428
|
+
## 3.0.0-beta.29
|
|
429
|
+
|
|
430
|
+
### Patch Changes
|
|
431
|
+
|
|
432
|
+
- Updated dependencies [877bf12]
|
|
433
|
+
- ai@7.0.0-beta.29
|
|
434
|
+
|
|
435
|
+
## 3.0.0-beta.28
|
|
436
|
+
|
|
437
|
+
### Patch Changes
|
|
438
|
+
|
|
439
|
+
- Updated dependencies [b9cf502]
|
|
440
|
+
- ai@7.0.0-beta.28
|
|
441
|
+
|
|
442
|
+
## 3.0.0-beta.27
|
|
443
|
+
|
|
444
|
+
### Patch Changes
|
|
445
|
+
|
|
446
|
+
- Updated dependencies [3887c70]
|
|
447
|
+
- ai@7.0.0-beta.27
|
|
448
|
+
|
|
449
|
+
## 3.0.0-beta.26
|
|
450
|
+
|
|
451
|
+
### Patch Changes
|
|
452
|
+
|
|
453
|
+
- Updated dependencies [f0b0b20]
|
|
454
|
+
- ai@7.0.0-beta.26
|
|
455
|
+
|
|
456
|
+
## 3.0.0-beta.25
|
|
457
|
+
|
|
458
|
+
### Patch Changes
|
|
459
|
+
|
|
460
|
+
- Updated dependencies [ff9ce30]
|
|
461
|
+
- ai@7.0.0-beta.25
|
|
462
|
+
|
|
463
|
+
## 3.0.0-beta.24
|
|
464
|
+
|
|
465
|
+
### Patch Changes
|
|
466
|
+
|
|
467
|
+
- Updated dependencies [776b617]
|
|
468
|
+
- ai@7.0.0-beta.24
|
|
469
|
+
|
|
470
|
+
## 3.0.0-beta.23
|
|
471
|
+
|
|
472
|
+
### Patch Changes
|
|
473
|
+
|
|
474
|
+
- Updated dependencies [80d4dde]
|
|
475
|
+
- ai@7.0.0-beta.23
|
|
476
|
+
|
|
477
|
+
## 3.0.0-beta.22
|
|
478
|
+
|
|
479
|
+
### Patch Changes
|
|
480
|
+
|
|
481
|
+
- ai@7.0.0-beta.22
|
|
482
|
+
|
|
483
|
+
## 3.0.0-beta.21
|
|
484
|
+
|
|
485
|
+
### Patch Changes
|
|
486
|
+
|
|
487
|
+
- Updated dependencies [34fd051]
|
|
488
|
+
- ai@7.0.0-beta.21
|
|
489
|
+
|
|
490
|
+
## 3.0.0-beta.20
|
|
491
|
+
|
|
492
|
+
### Patch Changes
|
|
493
|
+
|
|
494
|
+
- ai@7.0.0-beta.20
|
|
495
|
+
|
|
496
|
+
## 3.0.0-beta.19
|
|
497
|
+
|
|
498
|
+
### Patch Changes
|
|
499
|
+
|
|
500
|
+
- ai@7.0.0-beta.19
|
|
501
|
+
|
|
502
|
+
## 3.0.0-beta.18
|
|
503
|
+
|
|
504
|
+
### Patch Changes
|
|
505
|
+
|
|
506
|
+
- ai@7.0.0-beta.18
|
|
507
|
+
|
|
508
|
+
## 3.0.0-beta.17
|
|
509
|
+
|
|
510
|
+
### Patch Changes
|
|
511
|
+
|
|
512
|
+
- ai@7.0.0-beta.17
|
|
513
|
+
|
|
514
|
+
## 3.0.0-beta.16
|
|
515
|
+
|
|
516
|
+
### Patch Changes
|
|
517
|
+
|
|
518
|
+
- Updated dependencies [5b8c58f]
|
|
519
|
+
- ai@7.0.0-beta.16
|
|
520
|
+
|
|
521
|
+
## 3.0.0-beta.15
|
|
522
|
+
|
|
523
|
+
### Patch Changes
|
|
524
|
+
|
|
525
|
+
- ai@7.0.0-beta.15
|
|
526
|
+
|
|
527
|
+
## 3.0.0-beta.14
|
|
528
|
+
|
|
529
|
+
### Patch Changes
|
|
530
|
+
|
|
531
|
+
- ai@7.0.0-beta.14
|
|
532
|
+
|
|
533
|
+
## 3.0.0-beta.13
|
|
534
|
+
|
|
535
|
+
### Patch Changes
|
|
536
|
+
|
|
537
|
+
- Updated dependencies [c26ca8d]
|
|
538
|
+
- ai@7.0.0-beta.13
|
|
539
|
+
|
|
540
|
+
## 3.0.0-beta.12
|
|
541
|
+
|
|
542
|
+
### Patch Changes
|
|
543
|
+
|
|
544
|
+
- ai@7.0.0-beta.12
|
|
545
|
+
|
|
546
|
+
## 3.0.0-beta.11
|
|
547
|
+
|
|
548
|
+
### Patch Changes
|
|
549
|
+
|
|
550
|
+
- ai@7.0.0-beta.11
|
|
551
|
+
|
|
552
|
+
## 3.0.0-beta.10
|
|
553
|
+
|
|
554
|
+
### Patch Changes
|
|
555
|
+
|
|
556
|
+
- ai@7.0.0-beta.10
|
|
557
|
+
|
|
3
558
|
## 3.0.0-beta.9
|
|
4
559
|
|
|
5
560
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1,31 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/index.ts
|
|
21
|
-
var src_exports = {};
|
|
22
|
-
__export(src_exports, {
|
|
23
|
-
toUIMessageStream: () => toUIMessageStream
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(src_exports);
|
|
26
|
-
|
|
27
1
|
// src/llamaindex-adapter.ts
|
|
28
|
-
|
|
2
|
+
import { convertAsyncIteratorToReadableStream } from "ai/internal";
|
|
29
3
|
|
|
30
4
|
// src/stream-callbacks.ts
|
|
31
5
|
function createCallbacksTransformer(callbacks = {}) {
|
|
@@ -53,7 +27,7 @@ function createCallbacksTransformer(callbacks = {}) {
|
|
|
53
27
|
// src/llamaindex-adapter.ts
|
|
54
28
|
function toUIMessageStream(stream, callbacks) {
|
|
55
29
|
const trimStart = trimStartOfStream();
|
|
56
|
-
return
|
|
30
|
+
return convertAsyncIteratorToReadableStream(stream[Symbol.asyncIterator]()).pipeThrough(
|
|
57
31
|
new TransformStream({
|
|
58
32
|
async transform(message, controller) {
|
|
59
33
|
controller.enqueue(trimStart(message.delta));
|
|
@@ -83,8 +57,7 @@ function trimStartOfStream() {
|
|
|
83
57
|
return text;
|
|
84
58
|
};
|
|
85
59
|
}
|
|
86
|
-
|
|
87
|
-
0 && (module.exports = {
|
|
60
|
+
export {
|
|
88
61
|
toUIMessageStream
|
|
89
|
-
}
|
|
62
|
+
};
|
|
90
63
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/
|
|
1
|
+
{"version":3,"sources":["../src/llamaindex-adapter.ts","../src/stream-callbacks.ts"],"sourcesContent":["import { UIMessageChunk } from 'ai';\nimport { convertAsyncIteratorToReadableStream } from 'ai/internal';\nimport {\n createCallbacksTransformer,\n StreamCallbacks,\n} from './stream-callbacks';\n\ntype EngineResponse = {\n delta: string;\n};\n\nexport function toUIMessageStream(\n stream: AsyncIterable<EngineResponse>,\n callbacks?: StreamCallbacks,\n) {\n const trimStart = trimStartOfStream();\n\n return convertAsyncIteratorToReadableStream(stream[Symbol.asyncIterator]())\n .pipeThrough(\n new TransformStream({\n async transform(message, controller): Promise<void> {\n controller.enqueue(trimStart(message.delta));\n },\n }),\n )\n .pipeThrough(createCallbacksTransformer(callbacks))\n .pipeThrough(\n new TransformStream<string, UIMessageChunk>({\n start: async controller => {\n controller.enqueue({ type: 'text-start', id: '1' });\n },\n transform: async (chunk, controller) => {\n controller.enqueue({ type: 'text-delta', delta: chunk, id: '1' });\n },\n flush: async controller => {\n controller.enqueue({ type: 'text-end', id: '1' });\n },\n }),\n );\n}\n\nfunction trimStartOfStream(): (text: string) => string {\n let isStreamStart = true;\n\n return (text: string): string => {\n if (isStreamStart) {\n text = text.trimStart();\n if (text) isStreamStart = false;\n }\n return text;\n };\n}\n","/**\n * Configuration options and helper callback methods for stream lifecycle events.\n */\nexport interface StreamCallbacks {\n /** `onStart`: Called once when the stream is initialized. */\n onStart?: () => Promise<void> | void;\n\n /** `onFinal`: Called once when the stream is closed with the final completion message. */\n onFinal?: (completion: string) => Promise<void> | void;\n\n /** `onToken`: Called for each tokenized message. */\n onToken?: (token: string) => Promise<void> | void;\n\n /** `onText`: Called for each text chunk. */\n onText?: (text: string) => Promise<void> | void;\n}\n\n/**\n * Creates a transform stream that encodes input messages and invokes optional callback functions.\n * The transform stream uses the provided callbacks to execute custom logic at different stages of the stream's lifecycle.\n * - `onStart`: Called once when the stream is initialized.\n * - `onToken`: Called for each tokenized message.\n * - `onFinal`: Called once when the stream is closed with the final completion message.\n *\n * This function is useful when you want to process a stream of messages and perform specific actions during the stream's lifecycle.\n *\n * @param {StreamCallbacks} [callbacks] - An object containing the callback functions.\n * @return {TransformStream<string, Uint8Array>} A transform stream that encodes input messages as Uint8Array and allows the execution of custom logic through callbacks.\n *\n * @example\n * const callbacks = {\n * onStart: async () => console.log('Stream started'),\n * onToken: async (token) => console.log(`Token: ${token}`),\n * onFinal: async () => data.close()\n * };\n * const transformer = createCallbacksTransformer(callbacks);\n */\nexport function createCallbacksTransformer(\n callbacks: StreamCallbacks | undefined = {},\n): TransformStream<string, string> {\n let aggregatedResponse = '';\n\n return new TransformStream({\n async start(): Promise<void> {\n if (callbacks.onStart) await callbacks.onStart();\n },\n\n async transform(message, controller): Promise<void> {\n controller.enqueue(message);\n\n aggregatedResponse += message;\n\n if (callbacks.onToken) await callbacks.onToken(message);\n if (callbacks.onText && typeof message === 'string') {\n await callbacks.onText(message);\n }\n },\n\n async flush(): Promise<void> {\n if (callbacks.onFinal) {\n await callbacks.onFinal(aggregatedResponse);\n }\n },\n });\n}\n"],"mappings":";AACA,SAAS,4CAA4C;;;ACoC9C,SAAS,2BACd,YAAyC,CAAC,GACT;AACjC,MAAI,qBAAqB;AAEzB,SAAO,IAAI,gBAAgB;AAAA,IACzB,MAAM,QAAuB;AAC3B,UAAI,UAAU,QAAS,OAAM,UAAU,QAAQ;AAAA,IACjD;AAAA,IAEA,MAAM,UAAU,SAAS,YAA2B;AAClD,iBAAW,QAAQ,OAAO;AAE1B,4BAAsB;AAEtB,UAAI,UAAU,QAAS,OAAM,UAAU,QAAQ,OAAO;AACtD,UAAI,UAAU,UAAU,OAAO,YAAY,UAAU;AACnD,cAAM,UAAU,OAAO,OAAO;AAAA,MAChC;AAAA,IACF;AAAA,IAEA,MAAM,QAAuB;AAC3B,UAAI,UAAU,SAAS;AACrB,cAAM,UAAU,QAAQ,kBAAkB;AAAA,MAC5C;AAAA,IACF;AAAA,EACF,CAAC;AACH;;;ADrDO,SAAS,kBACd,QACA,WACA;AACA,QAAM,YAAY,kBAAkB;AAEpC,SAAO,qCAAqC,OAAO,OAAO,aAAa,EAAE,CAAC,EACvE;AAAA,IACC,IAAI,gBAAgB;AAAA,MAClB,MAAM,UAAU,SAAS,YAA2B;AAClD,mBAAW,QAAQ,UAAU,QAAQ,KAAK,CAAC;AAAA,MAC7C;AAAA,IACF,CAAC;AAAA,EACH,EACC,YAAY,2BAA2B,SAAS,CAAC,EACjD;AAAA,IACC,IAAI,gBAAwC;AAAA,MAC1C,OAAO,OAAM,eAAc;AACzB,mBAAW,QAAQ,EAAE,MAAM,cAAc,IAAI,IAAI,CAAC;AAAA,MACpD;AAAA,MACA,WAAW,OAAO,OAAO,eAAe;AACtC,mBAAW,QAAQ,EAAE,MAAM,cAAc,OAAO,OAAO,IAAI,IAAI,CAAC;AAAA,MAClE;AAAA,MACA,OAAO,OAAM,eAAc;AACzB,mBAAW,QAAQ,EAAE,MAAM,YAAY,IAAI,IAAI,CAAC;AAAA,MAClD;AAAA,IACF,CAAC;AAAA,EACH;AACJ;AAEA,SAAS,oBAA8C;AACrD,MAAI,gBAAgB;AAEpB,SAAO,CAAC,SAAyB;AAC/B,QAAI,eAAe;AACjB,aAAO,KAAK,UAAU;AACtB,UAAI,KAAM,iBAAgB;AAAA,IAC5B;AACA,WAAO;AAAA,EACT;AACF;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/llamaindex",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.91",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"license": "Apache-2.0",
|
|
5
6
|
"sideEffects": false,
|
|
6
7
|
"main": "./dist/index.js",
|
|
7
|
-
"module": "./dist/index.mjs",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist/**/*",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"./package.json": "./package.json",
|
|
21
21
|
".": {
|
|
22
22
|
"types": "./dist/index.d.ts",
|
|
23
|
-
"import": "./dist/index.
|
|
24
|
-
"
|
|
23
|
+
"import": "./dist/index.js",
|
|
24
|
+
"default": "./dist/index.js"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"ai": "7.0.0-beta.
|
|
28
|
+
"ai": "7.0.0-beta.91"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "20.17.24",
|
|
@@ -54,9 +54,7 @@
|
|
|
54
54
|
"build": "pnpm clean && tsup --tsconfig tsconfig.build.json",
|
|
55
55
|
"build:watch": "pnpm clean && tsup --watch",
|
|
56
56
|
"clean": "del-cli dist *.tsbuildinfo",
|
|
57
|
-
"lint": "eslint \"./**/*.ts*\"",
|
|
58
57
|
"type-check": "tsc --build",
|
|
59
|
-
"prettier-check": "prettier --check \"./**/*.ts*\"",
|
|
60
58
|
"test": "pnpm test:node && pnpm test:edge",
|
|
61
59
|
"test:update": "pnpm test:node -u",
|
|
62
60
|
"test:watch": "vitest --config vitest.node.config.js",
|
package/dist/index.d.mts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { UIMessageChunk } from 'ai';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Configuration options and helper callback methods for stream lifecycle events.
|
|
5
|
-
*/
|
|
6
|
-
interface StreamCallbacks {
|
|
7
|
-
/** `onStart`: Called once when the stream is initialized. */
|
|
8
|
-
onStart?: () => Promise<void> | void;
|
|
9
|
-
/** `onFinal`: Called once when the stream is closed with the final completion message. */
|
|
10
|
-
onFinal?: (completion: string) => Promise<void> | void;
|
|
11
|
-
/** `onToken`: Called for each tokenized message. */
|
|
12
|
-
onToken?: (token: string) => Promise<void> | void;
|
|
13
|
-
/** `onText`: Called for each text chunk. */
|
|
14
|
-
onText?: (text: string) => Promise<void> | void;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
type EngineResponse = {
|
|
18
|
-
delta: string;
|
|
19
|
-
};
|
|
20
|
-
declare function toUIMessageStream(stream: AsyncIterable<EngineResponse>, callbacks?: StreamCallbacks): ReadableStream<UIMessageChunk>;
|
|
21
|
-
|
|
22
|
-
export { toUIMessageStream };
|
package/dist/index.mjs
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
// src/llamaindex-adapter.ts
|
|
2
|
-
import { convertAsyncIteratorToReadableStream } from "ai/internal";
|
|
3
|
-
|
|
4
|
-
// src/stream-callbacks.ts
|
|
5
|
-
function createCallbacksTransformer(callbacks = {}) {
|
|
6
|
-
let aggregatedResponse = "";
|
|
7
|
-
return new TransformStream({
|
|
8
|
-
async start() {
|
|
9
|
-
if (callbacks.onStart) await callbacks.onStart();
|
|
10
|
-
},
|
|
11
|
-
async transform(message, controller) {
|
|
12
|
-
controller.enqueue(message);
|
|
13
|
-
aggregatedResponse += message;
|
|
14
|
-
if (callbacks.onToken) await callbacks.onToken(message);
|
|
15
|
-
if (callbacks.onText && typeof message === "string") {
|
|
16
|
-
await callbacks.onText(message);
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
async flush() {
|
|
20
|
-
if (callbacks.onFinal) {
|
|
21
|
-
await callbacks.onFinal(aggregatedResponse);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// src/llamaindex-adapter.ts
|
|
28
|
-
function toUIMessageStream(stream, callbacks) {
|
|
29
|
-
const trimStart = trimStartOfStream();
|
|
30
|
-
return convertAsyncIteratorToReadableStream(stream[Symbol.asyncIterator]()).pipeThrough(
|
|
31
|
-
new TransformStream({
|
|
32
|
-
async transform(message, controller) {
|
|
33
|
-
controller.enqueue(trimStart(message.delta));
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
).pipeThrough(createCallbacksTransformer(callbacks)).pipeThrough(
|
|
37
|
-
new TransformStream({
|
|
38
|
-
start: async (controller) => {
|
|
39
|
-
controller.enqueue({ type: "text-start", id: "1" });
|
|
40
|
-
},
|
|
41
|
-
transform: async (chunk, controller) => {
|
|
42
|
-
controller.enqueue({ type: "text-delta", delta: chunk, id: "1" });
|
|
43
|
-
},
|
|
44
|
-
flush: async (controller) => {
|
|
45
|
-
controller.enqueue({ type: "text-end", id: "1" });
|
|
46
|
-
}
|
|
47
|
-
})
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
function trimStartOfStream() {
|
|
51
|
-
let isStreamStart = true;
|
|
52
|
-
return (text) => {
|
|
53
|
-
if (isStreamStart) {
|
|
54
|
-
text = text.trimStart();
|
|
55
|
-
if (text) isStreamStart = false;
|
|
56
|
-
}
|
|
57
|
-
return text;
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
export {
|
|
61
|
-
toUIMessageStream
|
|
62
|
-
};
|
|
63
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/llamaindex-adapter.ts","../src/stream-callbacks.ts"],"sourcesContent":["import { UIMessageChunk } from 'ai';\nimport { convertAsyncIteratorToReadableStream } from 'ai/internal';\nimport {\n createCallbacksTransformer,\n StreamCallbacks,\n} from './stream-callbacks';\n\ntype EngineResponse = {\n delta: string;\n};\n\nexport function toUIMessageStream(\n stream: AsyncIterable<EngineResponse>,\n callbacks?: StreamCallbacks,\n) {\n const trimStart = trimStartOfStream();\n\n return convertAsyncIteratorToReadableStream(stream[Symbol.asyncIterator]())\n .pipeThrough(\n new TransformStream({\n async transform(message, controller): Promise<void> {\n controller.enqueue(trimStart(message.delta));\n },\n }),\n )\n .pipeThrough(createCallbacksTransformer(callbacks))\n .pipeThrough(\n new TransformStream<string, UIMessageChunk>({\n start: async controller => {\n controller.enqueue({ type: 'text-start', id: '1' });\n },\n transform: async (chunk, controller) => {\n controller.enqueue({ type: 'text-delta', delta: chunk, id: '1' });\n },\n flush: async controller => {\n controller.enqueue({ type: 'text-end', id: '1' });\n },\n }),\n );\n}\n\nfunction trimStartOfStream(): (text: string) => string {\n let isStreamStart = true;\n\n return (text: string): string => {\n if (isStreamStart) {\n text = text.trimStart();\n if (text) isStreamStart = false;\n }\n return text;\n };\n}\n","/**\n * Configuration options and helper callback methods for stream lifecycle events.\n */\nexport interface StreamCallbacks {\n /** `onStart`: Called once when the stream is initialized. */\n onStart?: () => Promise<void> | void;\n\n /** `onFinal`: Called once when the stream is closed with the final completion message. */\n onFinal?: (completion: string) => Promise<void> | void;\n\n /** `onToken`: Called for each tokenized message. */\n onToken?: (token: string) => Promise<void> | void;\n\n /** `onText`: Called for each text chunk. */\n onText?: (text: string) => Promise<void> | void;\n}\n\n/**\n * Creates a transform stream that encodes input messages and invokes optional callback functions.\n * The transform stream uses the provided callbacks to execute custom logic at different stages of the stream's lifecycle.\n * - `onStart`: Called once when the stream is initialized.\n * - `onToken`: Called for each tokenized message.\n * - `onFinal`: Called once when the stream is closed with the final completion message.\n *\n * This function is useful when you want to process a stream of messages and perform specific actions during the stream's lifecycle.\n *\n * @param {StreamCallbacks} [callbacks] - An object containing the callback functions.\n * @return {TransformStream<string, Uint8Array>} A transform stream that encodes input messages as Uint8Array and allows the execution of custom logic through callbacks.\n *\n * @example\n * const callbacks = {\n * onStart: async () => console.log('Stream started'),\n * onToken: async (token) => console.log(`Token: ${token}`),\n * onFinal: async () => data.close()\n * };\n * const transformer = createCallbacksTransformer(callbacks);\n */\nexport function createCallbacksTransformer(\n callbacks: StreamCallbacks | undefined = {},\n): TransformStream<string, string> {\n let aggregatedResponse = '';\n\n return new TransformStream({\n async start(): Promise<void> {\n if (callbacks.onStart) await callbacks.onStart();\n },\n\n async transform(message, controller): Promise<void> {\n controller.enqueue(message);\n\n aggregatedResponse += message;\n\n if (callbacks.onToken) await callbacks.onToken(message);\n if (callbacks.onText && typeof message === 'string') {\n await callbacks.onText(message);\n }\n },\n\n async flush(): Promise<void> {\n if (callbacks.onFinal) {\n await callbacks.onFinal(aggregatedResponse);\n }\n },\n });\n}\n"],"mappings":";AACA,SAAS,4CAA4C;;;ACoC9C,SAAS,2BACd,YAAyC,CAAC,GACT;AACjC,MAAI,qBAAqB;AAEzB,SAAO,IAAI,gBAAgB;AAAA,IACzB,MAAM,QAAuB;AAC3B,UAAI,UAAU,QAAS,OAAM,UAAU,QAAQ;AAAA,IACjD;AAAA,IAEA,MAAM,UAAU,SAAS,YAA2B;AAClD,iBAAW,QAAQ,OAAO;AAE1B,4BAAsB;AAEtB,UAAI,UAAU,QAAS,OAAM,UAAU,QAAQ,OAAO;AACtD,UAAI,UAAU,UAAU,OAAO,YAAY,UAAU;AACnD,cAAM,UAAU,OAAO,OAAO;AAAA,MAChC;AAAA,IACF;AAAA,IAEA,MAAM,QAAuB;AAC3B,UAAI,UAAU,SAAS;AACrB,cAAM,UAAU,QAAQ,kBAAkB;AAAA,MAC5C;AAAA,IACF;AAAA,EACF,CAAC;AACH;;;ADrDO,SAAS,kBACd,QACA,WACA;AACA,QAAM,YAAY,kBAAkB;AAEpC,SAAO,qCAAqC,OAAO,OAAO,aAAa,EAAE,CAAC,EACvE;AAAA,IACC,IAAI,gBAAgB;AAAA,MAClB,MAAM,UAAU,SAAS,YAA2B;AAClD,mBAAW,QAAQ,UAAU,QAAQ,KAAK,CAAC;AAAA,MAC7C;AAAA,IACF,CAAC;AAAA,EACH,EACC,YAAY,2BAA2B,SAAS,CAAC,EACjD;AAAA,IACC,IAAI,gBAAwC;AAAA,MAC1C,OAAO,OAAM,eAAc;AACzB,mBAAW,QAAQ,EAAE,MAAM,cAAc,IAAI,IAAI,CAAC;AAAA,MACpD;AAAA,MACA,WAAW,OAAO,OAAO,eAAe;AACtC,mBAAW,QAAQ,EAAE,MAAM,cAAc,OAAO,OAAO,IAAI,IAAI,CAAC;AAAA,MAClE;AAAA,MACA,OAAO,OAAM,eAAc;AACzB,mBAAW,QAAQ,EAAE,MAAM,YAAY,IAAI,IAAI,CAAC;AAAA,MAClD;AAAA,IACF,CAAC;AAAA,EACH;AACJ;AAEA,SAAS,oBAA8C;AACrD,MAAI,gBAAgB;AAEpB,SAAO,CAAC,SAAyB;AAC/B,QAAI,eAAe;AACjB,aAAO,KAAK,UAAU;AACtB,UAAI,KAAM,iBAAgB;AAAA,IAC5B;AACA,WAAO;AAAA,EACT;AACF;","names":[]}
|