@ai-sdk/llamaindex 3.0.0-beta.17 → 3.0.0-beta.177

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 CHANGED
@@ -1,5 +1,1173 @@
1
1
  # @ai-sdk/llamaindex
2
2
 
3
+ ## 3.0.0-beta.177
4
+
5
+ ### Patch Changes
6
+
7
+ - b8396f0: trigger initial beta release
8
+ - Updated dependencies [b8396f0]
9
+ - ai@7.0.0-beta.177
10
+
11
+ ## 3.0.0-canary.176
12
+
13
+ ### Patch Changes
14
+
15
+ - ai@7.0.0-canary.176
16
+
17
+ ## 3.0.0-canary.175
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies [6ec57f5]
22
+ - ai@7.0.0-canary.175
23
+
24
+ ## 3.0.0-canary.174
25
+
26
+ ### Patch Changes
27
+
28
+ - ai@7.0.0-canary.174
29
+
30
+ ## 3.0.0-canary.173
31
+
32
+ ### Patch Changes
33
+
34
+ - ai@7.0.0-canary.173
35
+
36
+ ## 3.0.0-canary.172
37
+
38
+ ### Patch Changes
39
+
40
+ - Updated dependencies [25a64f8]
41
+ - Updated dependencies [375fdd7]
42
+ - Updated dependencies [f18b08f]
43
+ - Updated dependencies [b4507d5]
44
+ - ai@7.0.0-canary.172
45
+
46
+ ## 3.0.0-canary.171
47
+
48
+ ### Patch Changes
49
+
50
+ - Updated dependencies [89ad56f]
51
+ - Updated dependencies [f9a496f]
52
+ - Updated dependencies [3295831]
53
+ - ai@7.0.0-canary.171
54
+
55
+ ## 3.0.0-canary.170
56
+
57
+ ### Patch Changes
58
+
59
+ - Updated dependencies [bae5e2b]
60
+ - Updated dependencies [69d7128]
61
+ - ai@7.0.0-canary.170
62
+
63
+ ## 3.0.0-canary.169
64
+
65
+ ### Patch Changes
66
+
67
+ - Updated dependencies [a5018ab]
68
+ - Updated dependencies [21d3d60]
69
+ - Updated dependencies [426dbbb]
70
+ - Updated dependencies [7fd3360]
71
+ - ai@7.0.0-canary.169
72
+
73
+ ## 3.0.0-canary.168
74
+
75
+ ### Patch Changes
76
+
77
+ - Updated dependencies [1e4b350]
78
+ - ai@7.0.0-canary.168
79
+
80
+ ## 3.0.0-canary.167
81
+
82
+ ### Patch Changes
83
+
84
+ - Updated dependencies [4757690]
85
+ - Updated dependencies [eeefc3f]
86
+ - Updated dependencies [b79b6a8]
87
+ - ai@7.0.0-canary.167
88
+
89
+ ## 3.0.0-canary.166
90
+
91
+ ### Patch Changes
92
+
93
+ - Updated dependencies [19736ee]
94
+ - Updated dependencies [d66ae02]
95
+ - Updated dependencies [e4182bd]
96
+ - ai@7.0.0-canary.166
97
+
98
+ ## 3.0.0-canary.165
99
+
100
+ ### Patch Changes
101
+
102
+ - Updated dependencies [ce769dd]
103
+ - ai@7.0.0-canary.165
104
+
105
+ ## 3.0.0-canary.164
106
+
107
+ ### Patch Changes
108
+
109
+ - ai@7.0.0-canary.164
110
+
111
+ ## 3.0.0-canary.163
112
+
113
+ ### Patch Changes
114
+
115
+ - Updated dependencies [ee798eb]
116
+ - Updated dependencies [c907622]
117
+ - ai@7.0.0-canary.163
118
+
119
+ ## 3.0.0-canary.162
120
+
121
+ ### Patch Changes
122
+
123
+ - ai@7.0.0-canary.162
124
+
125
+ ## 3.0.0-canary.161
126
+
127
+ ### Patch Changes
128
+
129
+ - ai@7.0.0-canary.161
130
+
131
+ ## 3.0.0-canary.160
132
+
133
+ ### Patch Changes
134
+
135
+ - ai@7.0.0-canary.160
136
+
137
+ ## 3.0.0-canary.159
138
+
139
+ ### Patch Changes
140
+
141
+ - Updated dependencies [b5092f5]
142
+ - ai@7.0.0-canary.159
143
+
144
+ ## 3.0.0-canary.158
145
+
146
+ ### Patch Changes
147
+
148
+ - Updated dependencies [bcce2dd]
149
+ - ai@7.0.0-canary.158
150
+
151
+ ## 3.0.0-canary.157
152
+
153
+ ### Patch Changes
154
+
155
+ - ai@7.0.0-canary.157
156
+
157
+ ## 3.0.0-canary.156
158
+
159
+ ### Patch Changes
160
+
161
+ - Updated dependencies [023550e]
162
+ - Updated dependencies [e92fc45]
163
+ - ai@7.0.0-canary.156
164
+
165
+ ## 3.0.0-canary.155
166
+
167
+ ### Patch Changes
168
+
169
+ - Updated dependencies [e67d80e]
170
+ - Updated dependencies [6cca112]
171
+ - Updated dependencies [82fc0ab]
172
+ - Updated dependencies [76fd58c]
173
+ - ai@7.0.0-canary.155
174
+
175
+ ## 3.0.0-canary.154
176
+
177
+ ### Patch Changes
178
+
179
+ - Updated dependencies [594029e]
180
+ - ai@7.0.0-canary.154
181
+
182
+ ## 3.0.0-canary.153
183
+
184
+ ### Patch Changes
185
+
186
+ - Updated dependencies [6c93e36]
187
+ - ai@7.0.0-canary.153
188
+
189
+ ## 3.0.0-canary.152
190
+
191
+ ### Patch Changes
192
+
193
+ - ai@7.0.0-canary.152
194
+
195
+ ## 3.0.0-canary.151
196
+
197
+ ### Patch Changes
198
+
199
+ - ai@7.0.0-canary.151
200
+
201
+ ## 3.0.0-canary.150
202
+
203
+ ### Patch Changes
204
+
205
+ - ai@7.0.0-canary.150
206
+
207
+ ## 3.0.0-canary.149
208
+
209
+ ### Patch Changes
210
+
211
+ - Updated dependencies [e3d9c0e]
212
+ - ai@7.0.0-canary.149
213
+
214
+ ## 3.0.0-canary.148
215
+
216
+ ### Patch Changes
217
+
218
+ - Updated dependencies [2852a84]
219
+ - ai@7.0.0-canary.148
220
+
221
+ ## 3.0.0-canary.147
222
+
223
+ ### Patch Changes
224
+
225
+ - ai@7.0.0-canary.147
226
+
227
+ ## 3.0.0-canary.146
228
+
229
+ ### Patch Changes
230
+
231
+ - ai@7.0.0-canary.146
232
+
233
+ ## 3.0.0-canary.145
234
+
235
+ ### Patch Changes
236
+
237
+ - ai@7.0.0-canary.145
238
+
239
+ ## 3.0.0-canary.144
240
+
241
+ ### Patch Changes
242
+
243
+ - 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
244
+ - Updated dependencies [7fc6bd6]
245
+ - ai@7.0.0-canary.144
246
+
247
+ ## 3.0.0-canary.143
248
+
249
+ ### Patch Changes
250
+
251
+ - Updated dependencies [a6617c5]
252
+ - ai@7.0.0-canary.143
253
+
254
+ ## 3.0.0-canary.142
255
+
256
+ ### Patch Changes
257
+
258
+ - Updated dependencies [62d6481]
259
+ - ai@7.0.0-canary.142
260
+
261
+ ## 3.0.0-canary.141
262
+
263
+ ### Patch Changes
264
+
265
+ - Updated dependencies [e3a0419]
266
+ - ai@7.0.0-canary.141
267
+
268
+ ## 3.0.0-canary.140
269
+
270
+ ### Patch Changes
271
+
272
+ - ai@7.0.0-canary.140
273
+
274
+ ## 3.0.0-canary.139
275
+
276
+ ### Patch Changes
277
+
278
+ - Updated dependencies [334ae5d]
279
+ - Updated dependencies [28dfa06]
280
+ - Updated dependencies [e93fa91]
281
+ - ai@7.0.0-canary.139
282
+
283
+ ## 3.0.0-canary.138
284
+
285
+ ### Patch Changes
286
+
287
+ - ai@7.0.0-canary.138
288
+
289
+ ## 3.0.0-canary.137
290
+
291
+ ### Patch Changes
292
+
293
+ - Updated dependencies [98627e5]
294
+ - Updated dependencies [476e1ca]
295
+ - ai@7.0.0-canary.137
296
+
297
+ ## 3.0.0-canary.136
298
+
299
+ ### Patch Changes
300
+
301
+ - Updated dependencies [a7de9c9]
302
+ - ai@7.0.0-canary.136
303
+
304
+ ## 3.0.0-canary.135
305
+
306
+ ### Patch Changes
307
+
308
+ - ai@7.0.0-canary.135
309
+
310
+ ## 3.0.0-canary.134
311
+
312
+ ### Patch Changes
313
+
314
+ - Updated dependencies [ed74dae]
315
+ - Updated dependencies [f4cc8eb]
316
+ - Updated dependencies [e80ada0]
317
+ - Updated dependencies [1dca341]
318
+ - Updated dependencies [2605e5f]
319
+ - ai@7.0.0-canary.134
320
+
321
+ ## 3.0.0-canary.133
322
+
323
+ ### Patch Changes
324
+
325
+ - Updated dependencies [38ca8dc]
326
+ - Updated dependencies [6d76710]
327
+ - ai@7.0.0-canary.133
328
+
329
+ ## 3.0.0-canary.132
330
+
331
+ ### Patch Changes
332
+
333
+ - Updated dependencies [eaf849f]
334
+ - Updated dependencies [8565dcb]
335
+ - ai@7.0.0-canary.132
336
+
337
+ ## 3.0.0-canary.131
338
+
339
+ ### Patch Changes
340
+
341
+ - Updated dependencies [b67525f]
342
+ - Updated dependencies [ca446f8]
343
+ - Updated dependencies [bcacd48]
344
+ - ai@7.0.0-canary.131
345
+
346
+ ## 3.0.0-canary.130
347
+
348
+ ### Patch Changes
349
+
350
+ - ai@7.0.0-canary.130
351
+
352
+ ## 3.0.0-canary.129
353
+
354
+ ### Patch Changes
355
+
356
+ - Updated dependencies [d1b3786]
357
+ - ai@7.0.0-canary.129
358
+
359
+ ## 3.0.0-canary.128
360
+
361
+ ### Patch Changes
362
+
363
+ - ai@7.0.0-canary.128
364
+
365
+ ## 3.0.0-canary.127
366
+
367
+ ### Patch Changes
368
+
369
+ - Updated dependencies [e95e38d]
370
+ - Updated dependencies [016e877]
371
+ - Updated dependencies [ca99fea]
372
+ - Updated dependencies [d775a57]
373
+ - Updated dependencies [538c12b]
374
+ - ai@7.0.0-canary.127
375
+
376
+ ## 3.0.0-canary.126
377
+
378
+ ### Patch Changes
379
+
380
+ - ai@7.0.0-canary.126
381
+
382
+ ## 3.0.0-canary.125
383
+
384
+ ### Patch Changes
385
+
386
+ - Updated dependencies [fd4f578]
387
+ - Updated dependencies [31f69de]
388
+ - Updated dependencies [7c71ac6]
389
+ - Updated dependencies [c0c8ca2]
390
+ - Updated dependencies [5faf71c]
391
+ - Updated dependencies [69254e0]
392
+ - Updated dependencies [3015fc3]
393
+ - Updated dependencies [eee1166]
394
+ - Updated dependencies [7dbf992]
395
+ - ai@7.0.0-canary.125
396
+
397
+ ## 3.0.0-canary.124
398
+
399
+ ### Patch Changes
400
+
401
+ - Updated dependencies [69aeb0e]
402
+ - Updated dependencies [48e92f3]
403
+ - ai@7.0.0-canary.124
404
+
405
+ ## 3.0.0-canary.123
406
+
407
+ ### Patch Changes
408
+
409
+ - Updated dependencies [7392266]
410
+ - Updated dependencies [4bb4dbc]
411
+ - ai@7.0.0-canary.123
412
+
413
+ ## 3.0.0-canary.122
414
+
415
+ ### Patch Changes
416
+
417
+ - Updated dependencies [79b2468]
418
+ - Updated dependencies [c22750c]
419
+ - ai@7.0.0-canary.122
420
+
421
+ ## 3.0.0-canary.121
422
+
423
+ ### Patch Changes
424
+
425
+ - Updated dependencies [2427d88]
426
+ - Updated dependencies [5588abd]
427
+ - Updated dependencies [6dd6b83]
428
+ - ai@7.0.0-canary.121
429
+
430
+ ## 3.0.0-canary.120
431
+
432
+ ### Patch Changes
433
+
434
+ - Updated dependencies [5463d0d]
435
+ - ai@7.0.0-canary.120
436
+
437
+ ## 3.0.0-canary.119
438
+
439
+ ### Patch Changes
440
+
441
+ - ai@7.0.0-canary.119
442
+
443
+ ## 3.0.0-canary.118
444
+
445
+ ### Patch Changes
446
+
447
+ - Updated dependencies [47e65d6]
448
+ - ai@7.0.0-canary.118
449
+
450
+ ## 3.0.0-canary.117
451
+
452
+ ### Patch Changes
453
+
454
+ - 0c4c275: trigger initial canary release
455
+ - Updated dependencies [0c4c275]
456
+ - ai@7.0.0-canary.117
457
+
458
+ ## 3.0.0-beta.116
459
+
460
+ ### Patch Changes
461
+
462
+ - ai@7.0.0-beta.116
463
+
464
+ ## 3.0.0-beta.115
465
+
466
+ ### Patch Changes
467
+
468
+ - Updated dependencies [08d2129]
469
+ - Updated dependencies [202f107]
470
+ - ai@7.0.0-beta.115
471
+
472
+ ## 3.0.0-beta.114
473
+
474
+ ### Patch Changes
475
+
476
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
477
+ - Updated dependencies [43a6750]
478
+ - Updated dependencies [81caa5d]
479
+ - Updated dependencies [1f7db50]
480
+ - Updated dependencies [9bd6512]
481
+ - Updated dependencies [258c093]
482
+ - Updated dependencies [6147cdf]
483
+ - ai@7.0.0-beta.114
484
+
485
+ ## 3.0.0-beta.113
486
+
487
+ ### Patch Changes
488
+
489
+ - 9f0e36c: trigger release for all packages after provenance setup
490
+ - Updated dependencies [9f0e36c]
491
+ - ai@7.0.0-beta.113
492
+
493
+ ## 3.0.0-beta.112
494
+
495
+ ### Patch Changes
496
+
497
+ - Updated dependencies [5f3749c]
498
+ - Updated dependencies [0a51f7d]
499
+ - Updated dependencies [71d3022]
500
+ - Updated dependencies [67df0a0]
501
+ - Updated dependencies [4181cfe]
502
+ - Updated dependencies [51ce232]
503
+ - Updated dependencies [cf93359]
504
+ - Updated dependencies [befb78c]
505
+ - Updated dependencies [29d8cf4]
506
+ - Updated dependencies [58a2ad7]
507
+ - Updated dependencies [37d69b2]
508
+ - Updated dependencies [1043274]
509
+ - Updated dependencies [7f59f04]
510
+ - Updated dependencies [7677c1e]
511
+ - Updated dependencies [116c89f]
512
+ - Updated dependencies [f58f9bc]
513
+ - Updated dependencies [e1bfb9c]
514
+ - Updated dependencies [e87d71b]
515
+ - Updated dependencies [9d486aa]
516
+ - Updated dependencies [9b0bc8a]
517
+ - Updated dependencies [fc92055]
518
+ - Updated dependencies [4e095b0]
519
+ - ai@7.0.0-beta.112
520
+
521
+ ## 3.0.0-beta.111
522
+
523
+ ### Patch Changes
524
+
525
+ - Updated dependencies [f319fde]
526
+ - Updated dependencies [1949571]
527
+ - Updated dependencies [511902c]
528
+ - Updated dependencies [6542d93]
529
+ - Updated dependencies [2e98477]
530
+ - Updated dependencies [876fd3e]
531
+ - Updated dependencies [f32c750]
532
+ - ai@7.0.0-beta.111
533
+
534
+ ## 3.0.0-beta.110
535
+
536
+ ### Patch Changes
537
+
538
+ - Updated dependencies [72cb801]
539
+ - ai@7.0.0-beta.110
540
+
541
+ ## 3.0.0-beta.109
542
+
543
+ ### Patch Changes
544
+
545
+ - Updated dependencies [ec98264]
546
+ - Updated dependencies [eea8d98]
547
+ - Updated dependencies [75ef93e]
548
+ - ai@7.0.0-beta.109
549
+
550
+ ## 3.0.0-beta.108
551
+
552
+ ### Patch Changes
553
+
554
+ - ai@7.0.0-beta.108
555
+
556
+ ## 3.0.0-beta.107
557
+
558
+ ### Patch Changes
559
+
560
+ - Updated dependencies [350ea38]
561
+ - ai@7.0.0-beta.107
562
+
563
+ ## 3.0.0-beta.106
564
+
565
+ ### Patch Changes
566
+
567
+ - ai@7.0.0-beta.106
568
+
569
+ ## 3.0.0-beta.105
570
+
571
+ ### Patch Changes
572
+
573
+ - Updated dependencies [33d099c]
574
+ - ai@7.0.0-beta.105
575
+
576
+ ## 3.0.0-beta.104
577
+
578
+ ### Patch Changes
579
+
580
+ - Updated dependencies [2a74d43]
581
+ - ai@7.0.0-beta.104
582
+
583
+ ## 3.0.0-beta.103
584
+
585
+ ### Patch Changes
586
+
587
+ - Updated dependencies [382d53b]
588
+ - Updated dependencies [7bf7d7f]
589
+ - Updated dependencies [c3d4019]
590
+ - Updated dependencies [083947b]
591
+ - ai@7.0.0-beta.103
592
+
593
+ ## 3.0.0-beta.102
594
+
595
+ ### Patch Changes
596
+
597
+ - ai@7.0.0-beta.102
598
+
599
+ ## 3.0.0-beta.101
600
+
601
+ ### Patch Changes
602
+
603
+ - Updated dependencies [4873966]
604
+ - ai@7.0.0-beta.101
605
+
606
+ ## 3.0.0-beta.100
607
+
608
+ ### Patch Changes
609
+
610
+ - Updated dependencies [add1126]
611
+ - ai@7.0.0-beta.100
612
+
613
+ ## 3.0.0-beta.99
614
+
615
+ ### Patch Changes
616
+
617
+ - Updated dependencies [2a9c144]
618
+ - ai@7.0.0-beta.99
619
+
620
+ ## 3.0.0-beta.98
621
+
622
+ ### Patch Changes
623
+
624
+ - ai@7.0.0-beta.98
625
+
626
+ ## 3.0.0-beta.97
627
+
628
+ ### Patch Changes
629
+
630
+ - Updated dependencies [208d045]
631
+ - ai@7.0.0-beta.97
632
+
633
+ ## 3.0.0-beta.96
634
+
635
+ ### Patch Changes
636
+
637
+ - ai@7.0.0-beta.96
638
+
639
+ ## 3.0.0-beta.95
640
+
641
+ ### Patch Changes
642
+
643
+ - Updated dependencies [c4f4b5f]
644
+ - ai@7.0.0-beta.95
645
+
646
+ ## 3.0.0-beta.94
647
+
648
+ ### Patch Changes
649
+
650
+ - Updated dependencies [1582efa]
651
+ - ai@7.0.0-beta.94
652
+
653
+ ## 3.0.0-beta.93
654
+
655
+ ### Patch Changes
656
+
657
+ - Updated dependencies [bc47739]
658
+ - ai@7.0.0-beta.93
659
+
660
+ ## 3.0.0-beta.92
661
+
662
+ ### Patch Changes
663
+
664
+ - ai@7.0.0-beta.92
665
+
666
+ ## 3.0.0-beta.91
667
+
668
+ ### Patch Changes
669
+
670
+ - ai@7.0.0-beta.91
671
+
672
+ ## 3.0.0-beta.90
673
+
674
+ ### Patch Changes
675
+
676
+ - Updated dependencies [1db29c8]
677
+ - ai@7.0.0-beta.90
678
+
679
+ ## 3.0.0-beta.89
680
+
681
+ ### Patch Changes
682
+
683
+ - Updated dependencies [ff5eba1]
684
+ - ai@7.0.0-beta.89
685
+
686
+ ## 3.0.0-beta.88
687
+
688
+ ### Major Changes
689
+
690
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
691
+
692
+ ### Patch Changes
693
+
694
+ - Updated dependencies [ef992f8]
695
+ - ai@7.0.0-beta.88
696
+
697
+ ## 3.0.0-beta.87
698
+
699
+ ### Patch Changes
700
+
701
+ - ai@7.0.0-beta.87
702
+
703
+ ## 3.0.0-beta.86
704
+
705
+ ### Patch Changes
706
+
707
+ - Updated dependencies [5a6f514]
708
+ - ai@7.0.0-beta.86
709
+
710
+ ## 3.0.0-beta.85
711
+
712
+ ### Patch Changes
713
+
714
+ - Updated dependencies [57bf606]
715
+ - ai@7.0.0-beta.85
716
+
717
+ ## 3.0.0-beta.84
718
+
719
+ ### Patch Changes
720
+
721
+ - Updated dependencies [90e2d8a]
722
+ - ai@7.0.0-beta.84
723
+
724
+ ## 3.0.0-beta.83
725
+
726
+ ### Patch Changes
727
+
728
+ - ai@7.0.0-beta.83
729
+
730
+ ## 3.0.0-beta.82
731
+
732
+ ### Patch Changes
733
+
734
+ - Updated dependencies [e27ed76]
735
+ - ai@7.0.0-beta.82
736
+
737
+ ## 3.0.0-beta.81
738
+
739
+ ### Patch Changes
740
+
741
+ - Updated dependencies [2fe1099]
742
+ - Updated dependencies [f04adcb]
743
+ - ai@7.0.0-beta.81
744
+
745
+ ## 3.0.0-beta.80
746
+
747
+ ### Patch Changes
748
+
749
+ - Updated dependencies [3ae1786]
750
+ - ai@7.0.0-beta.80
751
+
752
+ ## 3.0.0-beta.79
753
+
754
+ ### Patch Changes
755
+
756
+ - Updated dependencies [6866afe]
757
+ - ai@7.0.0-beta.79
758
+
759
+ ## 3.0.0-beta.78
760
+
761
+ ### Patch Changes
762
+
763
+ - Updated dependencies [f372547]
764
+ - ai@7.0.0-beta.78
765
+
766
+ ## 3.0.0-beta.77
767
+
768
+ ### Patch Changes
769
+
770
+ - Updated dependencies [2add429]
771
+ - ai@7.0.0-beta.77
772
+
773
+ ## 3.0.0-beta.76
774
+
775
+ ### Patch Changes
776
+
777
+ - Updated dependencies [fcc6869]
778
+ - ai@7.0.0-beta.76
779
+
780
+ ## 3.0.0-beta.75
781
+
782
+ ### Patch Changes
783
+
784
+ - Updated dependencies [176466a]
785
+ - ai@7.0.0-beta.75
786
+
787
+ ## 3.0.0-beta.74
788
+
789
+ ### Patch Changes
790
+
791
+ - Updated dependencies [e311194]
792
+ - ai@7.0.0-beta.74
793
+
794
+ ## 3.0.0-beta.73
795
+
796
+ ### Patch Changes
797
+
798
+ - ai@7.0.0-beta.73
799
+
800
+ ## 3.0.0-beta.72
801
+
802
+ ### Patch Changes
803
+
804
+ - Updated dependencies [664a0eb]
805
+ - ai@7.0.0-beta.72
806
+
807
+ ## 3.0.0-beta.71
808
+
809
+ ### Patch Changes
810
+
811
+ - Updated dependencies [e68be55]
812
+ - ai@7.0.0-beta.71
813
+
814
+ ## 3.0.0-beta.70
815
+
816
+ ### Patch Changes
817
+
818
+ - ai@7.0.0-beta.70
819
+
820
+ ## 3.0.0-beta.69
821
+
822
+ ### Patch Changes
823
+
824
+ - Updated dependencies [34bd95d]
825
+ - Updated dependencies [008271d]
826
+ - Updated dependencies [72223e7]
827
+ - ai@7.0.0-beta.69
828
+
829
+ ## 3.0.0-beta.68
830
+
831
+ ### Patch Changes
832
+
833
+ - Updated dependencies [b0c2869]
834
+ - Updated dependencies [7e26e81]
835
+ - ai@7.0.0-beta.68
836
+
837
+ ## 3.0.0-beta.67
838
+
839
+ ### Patch Changes
840
+
841
+ - Updated dependencies [d1a8bed]
842
+ - ai@7.0.0-beta.67
843
+
844
+ ## 3.0.0-beta.66
845
+
846
+ ### Patch Changes
847
+
848
+ - ai@7.0.0-beta.66
849
+
850
+ ## 3.0.0-beta.65
851
+
852
+ ### Patch Changes
853
+
854
+ - ai@7.0.0-beta.65
855
+
856
+ ## 3.0.0-beta.64
857
+
858
+ ### Patch Changes
859
+
860
+ - ai@7.0.0-beta.64
861
+
862
+ ## 3.0.0-beta.63
863
+
864
+ ### Patch Changes
865
+
866
+ - Updated dependencies [6fd51c0]
867
+ - ai@7.0.0-beta.63
868
+
869
+ ## 3.0.0-beta.62
870
+
871
+ ### Patch Changes
872
+
873
+ - ai@7.0.0-beta.62
874
+
875
+ ## 3.0.0-beta.61
876
+
877
+ ### Patch Changes
878
+
879
+ - Updated dependencies [c29a26f]
880
+ - ai@7.0.0-beta.61
881
+
882
+ ## 3.0.0-beta.60
883
+
884
+ ### Patch Changes
885
+
886
+ - Updated dependencies [38fc777]
887
+ - ai@7.0.0-beta.60
888
+
889
+ ## 3.0.0-beta.59
890
+
891
+ ### Patch Changes
892
+
893
+ - ai@7.0.0-beta.59
894
+
895
+ ## 3.0.0-beta.58
896
+
897
+ ### Patch Changes
898
+
899
+ - Updated dependencies [2e17091]
900
+ - ai@7.0.0-beta.58
901
+
902
+ ## 3.0.0-beta.57
903
+
904
+ ### Patch Changes
905
+
906
+ - Updated dependencies [986c6fd]
907
+ - Updated dependencies [493295c]
908
+ - ai@7.0.0-beta.57
909
+
910
+ ## 3.0.0-beta.56
911
+
912
+ ### Patch Changes
913
+
914
+ - ai@7.0.0-beta.56
915
+
916
+ ## 3.0.0-beta.55
917
+
918
+ ### Patch Changes
919
+
920
+ - Updated dependencies [b3c9f6a]
921
+ - ai@7.0.0-beta.55
922
+
923
+ ## 3.0.0-beta.54
924
+
925
+ ### Patch Changes
926
+
927
+ - Updated dependencies [5d0f18e]
928
+ - ai@7.0.0-beta.54
929
+
930
+ ## 3.0.0-beta.53
931
+
932
+ ### Patch Changes
933
+
934
+ - Updated dependencies [9b47dea]
935
+ - ai@7.0.0-beta.53
936
+
937
+ ## 3.0.0-beta.52
938
+
939
+ ### Patch Changes
940
+
941
+ - Updated dependencies [b56301c]
942
+ - ai@7.0.0-beta.52
943
+
944
+ ## 3.0.0-beta.51
945
+
946
+ ### Patch Changes
947
+
948
+ - Updated dependencies [6abd098]
949
+ - ai@7.0.0-beta.51
950
+
951
+ ## 3.0.0-beta.50
952
+
953
+ ### Patch Changes
954
+
955
+ - Updated dependencies [3debdb7]
956
+ - ai@7.0.0-beta.50
957
+
958
+ ## 3.0.0-beta.49
959
+
960
+ ### Patch Changes
961
+
962
+ - ai@7.0.0-beta.49
963
+
964
+ ## 3.0.0-beta.48
965
+
966
+ ### Patch Changes
967
+
968
+ - Updated dependencies [5c4d910]
969
+ - ai@7.0.0-beta.48
970
+
971
+ ## 3.0.0-beta.47
972
+
973
+ ### Patch Changes
974
+
975
+ - Updated dependencies [bc67b4f]
976
+ - ai@7.0.0-beta.47
977
+
978
+ ## 3.0.0-beta.46
979
+
980
+ ### Patch Changes
981
+
982
+ - Updated dependencies [31ee822]
983
+ - ai@7.0.0-beta.46
984
+
985
+ ## 3.0.0-beta.45
986
+
987
+ ### Patch Changes
988
+
989
+ - ai@7.0.0-beta.45
990
+
991
+ ## 3.0.0-beta.44
992
+
993
+ ### Patch Changes
994
+
995
+ - ai@7.0.0-beta.44
996
+
997
+ ## 3.0.0-beta.43
998
+
999
+ ### Patch Changes
1000
+
1001
+ - ai@7.0.0-beta.43
1002
+
1003
+ ## 3.0.0-beta.42
1004
+
1005
+ ### Patch Changes
1006
+
1007
+ - Updated dependencies [a3fd75b]
1008
+ - ai@7.0.0-beta.42
1009
+
1010
+ ## 3.0.0-beta.41
1011
+
1012
+ ### Patch Changes
1013
+
1014
+ - ai@7.0.0-beta.41
1015
+
1016
+ ## 3.0.0-beta.40
1017
+
1018
+ ### Patch Changes
1019
+
1020
+ - Updated dependencies [989d3d2]
1021
+ - ai@7.0.0-beta.40
1022
+
1023
+ ## 3.0.0-beta.39
1024
+
1025
+ ### Patch Changes
1026
+
1027
+ - Updated dependencies [f4cfccd]
1028
+ - ai@7.0.0-beta.39
1029
+
1030
+ ## 3.0.0-beta.38
1031
+
1032
+ ### Patch Changes
1033
+
1034
+ - Updated dependencies [1f509d4]
1035
+ - ai@7.0.0-beta.38
1036
+
1037
+ ## 3.0.0-beta.37
1038
+
1039
+ ### Patch Changes
1040
+
1041
+ - ai@7.0.0-beta.37
1042
+
1043
+ ## 3.0.0-beta.36
1044
+
1045
+ ### Patch Changes
1046
+
1047
+ - Updated dependencies [118b953]
1048
+ - ai@7.0.0-beta.36
1049
+
1050
+ ## 3.0.0-beta.35
1051
+
1052
+ ### Patch Changes
1053
+
1054
+ - Updated dependencies [99bf941]
1055
+ - ai@7.0.0-beta.35
1056
+
1057
+ ## 3.0.0-beta.34
1058
+
1059
+ ### Patch Changes
1060
+
1061
+ - ai@7.0.0-beta.34
1062
+
1063
+ ## 3.0.0-beta.33
1064
+
1065
+ ### Patch Changes
1066
+
1067
+ - Updated dependencies [caf1b6f]
1068
+ - ai@7.0.0-beta.33
1069
+
1070
+ ## 3.0.0-beta.32
1071
+
1072
+ ### Patch Changes
1073
+
1074
+ - Updated dependencies [4b46062]
1075
+ - ai@7.0.0-beta.32
1076
+
1077
+ ## 3.0.0-beta.31
1078
+
1079
+ ### Patch Changes
1080
+
1081
+ - Updated dependencies [e79e644]
1082
+ - ai@7.0.0-beta.31
1083
+
1084
+ ## 3.0.0-beta.30
1085
+
1086
+ ### Patch Changes
1087
+
1088
+ - Updated dependencies [f5a6f89]
1089
+ - ai@7.0.0-beta.30
1090
+
1091
+ ## 3.0.0-beta.29
1092
+
1093
+ ### Patch Changes
1094
+
1095
+ - Updated dependencies [877bf12]
1096
+ - ai@7.0.0-beta.29
1097
+
1098
+ ## 3.0.0-beta.28
1099
+
1100
+ ### Patch Changes
1101
+
1102
+ - Updated dependencies [b9cf502]
1103
+ - ai@7.0.0-beta.28
1104
+
1105
+ ## 3.0.0-beta.27
1106
+
1107
+ ### Patch Changes
1108
+
1109
+ - Updated dependencies [3887c70]
1110
+ - ai@7.0.0-beta.27
1111
+
1112
+ ## 3.0.0-beta.26
1113
+
1114
+ ### Patch Changes
1115
+
1116
+ - Updated dependencies [f0b0b20]
1117
+ - ai@7.0.0-beta.26
1118
+
1119
+ ## 3.0.0-beta.25
1120
+
1121
+ ### Patch Changes
1122
+
1123
+ - Updated dependencies [ff9ce30]
1124
+ - ai@7.0.0-beta.25
1125
+
1126
+ ## 3.0.0-beta.24
1127
+
1128
+ ### Patch Changes
1129
+
1130
+ - Updated dependencies [776b617]
1131
+ - ai@7.0.0-beta.24
1132
+
1133
+ ## 3.0.0-beta.23
1134
+
1135
+ ### Patch Changes
1136
+
1137
+ - Updated dependencies [80d4dde]
1138
+ - ai@7.0.0-beta.23
1139
+
1140
+ ## 3.0.0-beta.22
1141
+
1142
+ ### Patch Changes
1143
+
1144
+ - ai@7.0.0-beta.22
1145
+
1146
+ ## 3.0.0-beta.21
1147
+
1148
+ ### Patch Changes
1149
+
1150
+ - Updated dependencies [34fd051]
1151
+ - ai@7.0.0-beta.21
1152
+
1153
+ ## 3.0.0-beta.20
1154
+
1155
+ ### Patch Changes
1156
+
1157
+ - ai@7.0.0-beta.20
1158
+
1159
+ ## 3.0.0-beta.19
1160
+
1161
+ ### Patch Changes
1162
+
1163
+ - ai@7.0.0-beta.19
1164
+
1165
+ ## 3.0.0-beta.18
1166
+
1167
+ ### Patch Changes
1168
+
1169
+ - ai@7.0.0-beta.18
1170
+
3
1171
  ## 3.0.0-beta.17
4
1172
 
5
1173
  ### 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
- var import_internal = require("ai/internal");
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 (0, import_internal.convertAsyncIteratorToReadableStream)(stream[Symbol.asyncIterator]()).pipeThrough(
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
- // Annotate the CommonJS export names for ESM import in node:
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/index.ts","../src/llamaindex-adapter.ts","../src/stream-callbacks.ts"],"sourcesContent":["export * from './llamaindex-adapter';\n","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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,sBAAqD;;;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,aAAO,sDAAqC,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":[]}
1
+ {"version":3,"sources":["../src/llamaindex-adapter.ts","../src/stream-callbacks.ts"],"sourcesContent":["import type { UIMessageChunk } from 'ai';\nimport { convertAsyncIteratorToReadableStream } from 'ai/internal';\nimport {\n createCallbacksTransformer,\n type StreamCallbacks,\n} from './stream-callbacks';\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;;;ADtDO,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.17",
3
+ "version": "3.0.0-beta.177",
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,29 +20,31 @@
20
20
  "./package.json": "./package.json",
21
21
  ".": {
22
22
  "types": "./dist/index.d.ts",
23
- "import": "./dist/index.mjs",
24
- "require": "./dist/index.js"
23
+ "import": "./dist/index.js",
24
+ "default": "./dist/index.js"
25
25
  }
26
26
  },
27
27
  "dependencies": {
28
- "ai": "7.0.0-beta.17"
28
+ "ai": "7.0.0-beta.177"
29
29
  },
30
30
  "devDependencies": {
31
- "@types/node": "20.17.24",
32
- "tsup": "^8",
31
+ "@types/node": "22.19.19",
32
+ "tsup": "^8.5.1",
33
33
  "typescript": "5.8.3",
34
34
  "@vercel/ai-tsconfig": "0.0.0"
35
35
  },
36
36
  "engines": {
37
- "node": ">=18"
37
+ "node": ">=22"
38
38
  },
39
39
  "publishConfig": {
40
- "access": "public"
40
+ "access": "public",
41
+ "provenance": true
41
42
  },
42
43
  "homepage": "https://ai-sdk.dev/docs",
43
44
  "repository": {
44
45
  "type": "git",
45
- "url": "git+https://github.com/vercel/ai.git"
46
+ "url": "https://github.com/vercel/ai",
47
+ "directory": "packages/llamaindex"
46
48
  },
47
49
  "bugs": {
48
50
  "url": "https://github.com/vercel/ai/issues"
@@ -54,9 +56,7 @@
54
56
  "build": "pnpm clean && tsup --tsconfig tsconfig.build.json",
55
57
  "build:watch": "pnpm clean && tsup --watch",
56
58
  "clean": "del-cli dist *.tsbuildinfo",
57
- "lint": "eslint \"./**/*.ts*\"",
58
59
  "type-check": "tsc --build",
59
- "prettier-check": "prettier --check \"./**/*.ts*\"",
60
60
  "test": "pnpm test:node && pnpm test:edge",
61
61
  "test:update": "pnpm test:node -u",
62
62
  "test:watch": "vitest --config vitest.node.config.js",
@@ -1,10 +1,9 @@
1
- import { UIMessageChunk } from 'ai';
1
+ import type { UIMessageChunk } from 'ai';
2
2
  import { convertAsyncIteratorToReadableStream } from 'ai/internal';
3
3
  import {
4
4
  createCallbacksTransformer,
5
- StreamCallbacks,
5
+ type StreamCallbacks,
6
6
  } from './stream-callbacks';
7
-
8
7
  type EngineResponse = {
9
8
  delta: string;
10
9
  };
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
@@ -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":[]}