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

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