@ai-sdk/llamaindex 3.0.0-beta.18 → 3.0.0-beta.181

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