@mixedbread/sdk 0.50.1 → 0.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/bin/migration-config.json +0 -70
  3. package/client.d.mts +5 -7
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +5 -7
  6. package/client.d.ts.map +1 -1
  7. package/client.js +11 -6
  8. package/client.js.map +1 -1
  9. package/client.mjs +11 -6
  10. package/client.mjs.map +1 -1
  11. package/internal/parse.d.mts.map +1 -1
  12. package/internal/parse.d.ts.map +1 -1
  13. package/internal/parse.js +5 -0
  14. package/internal/parse.js.map +1 -1
  15. package/internal/parse.mjs +5 -0
  16. package/internal/parse.mjs.map +1 -1
  17. package/package.json +1 -1
  18. package/resources/index.d.mts +1 -2
  19. package/resources/index.d.mts.map +1 -1
  20. package/resources/index.d.ts +1 -2
  21. package/resources/index.d.ts.map +1 -1
  22. package/resources/index.js +1 -3
  23. package/resources/index.js.map +1 -1
  24. package/resources/index.mjs +0 -1
  25. package/resources/index.mjs.map +1 -1
  26. package/resources/stores/files.d.mts +94 -20
  27. package/resources/stores/files.d.mts.map +1 -1
  28. package/resources/stores/files.d.ts +94 -20
  29. package/resources/stores/files.d.ts.map +1 -1
  30. package/resources/stores/index.d.mts +1 -1
  31. package/resources/stores/index.d.mts.map +1 -1
  32. package/resources/stores/index.d.ts +1 -1
  33. package/resources/stores/index.d.ts.map +1 -1
  34. package/resources/stores/index.js.map +1 -1
  35. package/resources/stores/index.mjs.map +1 -1
  36. package/resources/stores/stores.d.mts +599 -10
  37. package/resources/stores/stores.d.mts.map +1 -1
  38. package/resources/stores/stores.d.ts +599 -10
  39. package/resources/stores/stores.d.ts.map +1 -1
  40. package/resources/stores/stores.js.map +1 -1
  41. package/resources/stores/stores.mjs.map +1 -1
  42. package/src/client.ts +23 -42
  43. package/src/internal/parse.ts +6 -0
  44. package/src/resources/index.ts +5 -19
  45. package/src/resources/stores/files.ts +132 -19
  46. package/src/resources/stores/index.ts +5 -0
  47. package/src/resources/stores/stores.ts +898 -15
  48. package/src/version.ts +1 -1
  49. package/version.d.mts +1 -1
  50. package/version.d.ts +1 -1
  51. package/version.js +1 -1
  52. package/version.mjs +1 -1
  53. package/resources/vector-stores/files.d.mts +0 -1379
  54. package/resources/vector-stores/files.d.mts.map +0 -1
  55. package/resources/vector-stores/files.d.ts +0 -1379
  56. package/resources/vector-stores/files.d.ts.map +0 -1
  57. package/resources/vector-stores/files.js +0 -126
  58. package/resources/vector-stores/files.js.map +0 -1
  59. package/resources/vector-stores/files.mjs +0 -121
  60. package/resources/vector-stores/files.mjs.map +0 -1
  61. package/resources/vector-stores/index.d.mts +0 -3
  62. package/resources/vector-stores/index.d.mts.map +0 -1
  63. package/resources/vector-stores/index.d.ts +0 -3
  64. package/resources/vector-stores/index.d.ts.map +0 -1
  65. package/resources/vector-stores/index.js +0 -9
  66. package/resources/vector-stores/index.js.map +0 -1
  67. package/resources/vector-stores/index.mjs +0 -4
  68. package/resources/vector-stores/index.mjs.map +0 -1
  69. package/resources/vector-stores/vector-stores.d.mts +0 -1885
  70. package/resources/vector-stores/vector-stores.d.mts.map +0 -1
  71. package/resources/vector-stores/vector-stores.d.ts +0 -1885
  72. package/resources/vector-stores/vector-stores.d.ts.map +0 -1
  73. package/resources/vector-stores/vector-stores.js +0 -75
  74. package/resources/vector-stores/vector-stores.js.map +0 -1
  75. package/resources/vector-stores/vector-stores.mjs +0 -70
  76. package/resources/vector-stores/vector-stores.mjs.map +0 -1
  77. package/resources/vector-stores.d.mts +0 -2
  78. package/resources/vector-stores.d.mts.map +0 -1
  79. package/resources/vector-stores.d.ts +0 -2
  80. package/resources/vector-stores.d.ts.map +0 -1
  81. package/resources/vector-stores.js +0 -6
  82. package/resources/vector-stores.js.map +0 -1
  83. package/resources/vector-stores.mjs +0 -3
  84. package/resources/vector-stores.mjs.map +0 -1
  85. package/src/resources/vector-stores/files.ts +0 -2062
  86. package/src/resources/vector-stores/index.ts +0 -36
  87. package/src/resources/vector-stores/vector-stores.ts +0 -2809
  88. package/src/resources/vector-stores.ts +0 -3
@@ -1,2809 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../core/resource';
4
- import * as Shared from '../shared';
5
- import * as FilesAPI from './files';
6
- import {
7
- FileCreateParams,
8
- FileDeleteParams,
9
- FileDeleteResponse,
10
- FileListParams,
11
- FileListResponse,
12
- FileRetrieveParams,
13
- FileSearchParams,
14
- FileSearchResponse,
15
- Files,
16
- RerankConfig,
17
- ScoredVectorStoreFile,
18
- VectorStoreFile,
19
- VectorStoreFileStatus,
20
- } from './files';
21
- import { APIPromise } from '../../core/api-promise';
22
- import { Cursor, type CursorParams, PagePromise } from '../../core/pagination';
23
- import { RequestOptions } from '../../internal/request-options';
24
- import { path } from '../../internal/utils/path';
25
-
26
- export class VectorStores extends APIResource {
27
- files: FilesAPI.Files = new FilesAPI.Files(this._client);
28
-
29
- /**
30
- * DEPRECATED: Use POST /stores instead
31
- *
32
- * @deprecated Use stores instead
33
- */
34
- create(body: VectorStoreCreateParams, options?: RequestOptions): APIPromise<VectorStore> {
35
- return this._client.post('/v1/vector_stores', { body, ...options });
36
- }
37
-
38
- /**
39
- * DEPRECATED: Use GET /stores/{store_identifier} instead
40
- *
41
- * @deprecated Use stores instead
42
- */
43
- retrieve(vectorStoreIdentifier: string, options?: RequestOptions): APIPromise<VectorStore> {
44
- return this._client.get(path`/v1/vector_stores/${vectorStoreIdentifier}`, options);
45
- }
46
-
47
- /**
48
- * DEPRECATED: Use PUT /stores/{store_identifier} instead
49
- *
50
- * @deprecated Use stores instead
51
- */
52
- update(
53
- vectorStoreIdentifier: string,
54
- body: VectorStoreUpdateParams,
55
- options?: RequestOptions,
56
- ): APIPromise<VectorStore> {
57
- return this._client.put(path`/v1/vector_stores/${vectorStoreIdentifier}`, { body, ...options });
58
- }
59
-
60
- /**
61
- * DEPRECATED: Use GET /stores instead
62
- *
63
- * @deprecated Use stores instead
64
- */
65
- list(
66
- query: VectorStoreListParams | null | undefined = {},
67
- options?: RequestOptions,
68
- ): PagePromise<VectorStoresCursor, VectorStore> {
69
- return this._client.getAPIList('/v1/vector_stores', Cursor<VectorStore>, { query, ...options });
70
- }
71
-
72
- /**
73
- * DEPRECATED: Use DELETE /stores/{store_identifier} instead
74
- *
75
- * @deprecated Use stores instead
76
- */
77
- delete(vectorStoreIdentifier: string, options?: RequestOptions): APIPromise<VectorStoreDeleteResponse> {
78
- return this._client.delete(path`/v1/vector_stores/${vectorStoreIdentifier}`, options);
79
- }
80
-
81
- /**
82
- * DEPRECATED: Use POST /stores/question-answering instead
83
- *
84
- * @deprecated Use stores.question_answering instead
85
- */
86
- questionAnswering(
87
- body: VectorStoreQuestionAnsweringParams,
88
- options?: RequestOptions,
89
- ): APIPromise<VectorStoreQuestionAnsweringResponse> {
90
- return this._client.post('/v1/vector_stores/question-answering', { body, ...options });
91
- }
92
-
93
- /**
94
- * DEPRECATED: Use POST /stores/search instead
95
- *
96
- * @deprecated Use stores.search instead
97
- */
98
- search(body: VectorStoreSearchParams, options?: RequestOptions): APIPromise<VectorStoreSearchResponse> {
99
- return this._client.post('/v1/vector_stores/search', { body, ...options });
100
- }
101
- }
102
-
103
- export type VectorStoresCursor = Cursor<VectorStore>;
104
-
105
- /**
106
- * Represents an expiration policy for a store.
107
- */
108
- export interface ExpiresAfter {
109
- /**
110
- * Anchor date for the expiration policy
111
- */
112
- anchor?: 'last_active_at';
113
-
114
- /**
115
- * Number of days after which the store expires
116
- */
117
- days?: number;
118
- }
119
-
120
- export interface ScoredAudioURLInputChunk {
121
- /**
122
- * position of the chunk in a file
123
- */
124
- chunk_index: number;
125
-
126
- /**
127
- * mime type of the chunk
128
- */
129
- mime_type?: string;
130
-
131
- /**
132
- * metadata of the chunk
133
- */
134
- generated_metadata?:
135
- | ScoredAudioURLInputChunk.MarkdownChunkGeneratedMetadata
136
- | ScoredAudioURLInputChunk.TextChunkGeneratedMetadata
137
- | ScoredAudioURLInputChunk.PdfChunkGeneratedMetadata
138
- | ScoredAudioURLInputChunk.CodeChunkGeneratedMetadata
139
- | ScoredAudioURLInputChunk.AudioChunkGeneratedMetadata
140
- | null;
141
-
142
- /**
143
- * model used for this chunk
144
- */
145
- model?: string | null;
146
-
147
- /**
148
- * score of the chunk
149
- */
150
- score: number;
151
-
152
- /**
153
- * file id
154
- */
155
- file_id: string;
156
-
157
- /**
158
- * filename
159
- */
160
- filename: string;
161
-
162
- /**
163
- * store id
164
- */
165
- store_id: string;
166
-
167
- /**
168
- * file metadata
169
- */
170
- metadata?: unknown;
171
-
172
- /**
173
- * Input type identifier
174
- */
175
- type?: 'audio_url';
176
-
177
- /**
178
- * speech recognition (sr) text of the audio
179
- */
180
- transcription?: string | null;
181
-
182
- /**
183
- * summary of the audio
184
- */
185
- summary?: string | null;
186
-
187
- /**
188
- * The audio input specification.
189
- */
190
- audio_url: ScoredAudioURLInputChunk.AudioURL;
191
-
192
- /**
193
- * The sampling rate of the audio.
194
- */
195
- sampling_rate: number;
196
- }
197
-
198
- export namespace ScoredAudioURLInputChunk {
199
- export interface MarkdownChunkGeneratedMetadata {
200
- type?: 'markdown';
201
-
202
- file_type?: 'text/markdown';
203
-
204
- language: string;
205
-
206
- word_count: number;
207
-
208
- file_size: number;
209
-
210
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
211
-
212
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
213
-
214
- start_line?: number;
215
-
216
- num_lines?: number;
217
-
218
- [k: string]: unknown;
219
- }
220
-
221
- export namespace MarkdownChunkGeneratedMetadata {
222
- export interface ChunkHeading {
223
- level: number;
224
-
225
- text: string;
226
- }
227
-
228
- export interface HeadingContext {
229
- level: number;
230
-
231
- text: string;
232
- }
233
- }
234
-
235
- export interface TextChunkGeneratedMetadata {
236
- type?: 'text';
237
-
238
- file_type?: 'text/plain';
239
-
240
- language: string;
241
-
242
- word_count: number;
243
-
244
- file_size: number;
245
-
246
- start_line?: number;
247
-
248
- num_lines?: number;
249
-
250
- [k: string]: unknown;
251
- }
252
-
253
- export interface PdfChunkGeneratedMetadata {
254
- type?: 'pdf';
255
-
256
- file_type?: 'application/pdf';
257
-
258
- total_pages: number;
259
-
260
- total_size: number;
261
-
262
- [k: string]: unknown;
263
- }
264
-
265
- export interface CodeChunkGeneratedMetadata {
266
- type?: 'code';
267
-
268
- file_type: string;
269
-
270
- language: string;
271
-
272
- word_count: number;
273
-
274
- file_size: number;
275
-
276
- start_line?: number;
277
-
278
- num_lines?: number;
279
-
280
- [k: string]: unknown;
281
- }
282
-
283
- export interface AudioChunkGeneratedMetadata {
284
- type?: 'audio';
285
-
286
- file_type: string;
287
-
288
- file_size: number;
289
-
290
- total_duration_seconds: number;
291
-
292
- sample_rate: number;
293
-
294
- channels: number;
295
-
296
- audio_format: number;
297
-
298
- [k: string]: unknown;
299
- }
300
-
301
- /**
302
- * The audio input specification.
303
- */
304
- export interface AudioURL {
305
- /**
306
- * The audio URL. Can be either a URL or a Data URI.
307
- */
308
- url: string;
309
- }
310
- }
311
-
312
- export interface ScoredImageURLInputChunk {
313
- /**
314
- * position of the chunk in a file
315
- */
316
- chunk_index: number;
317
-
318
- /**
319
- * mime type of the chunk
320
- */
321
- mime_type?: string;
322
-
323
- /**
324
- * metadata of the chunk
325
- */
326
- generated_metadata?:
327
- | ScoredImageURLInputChunk.MarkdownChunkGeneratedMetadata
328
- | ScoredImageURLInputChunk.TextChunkGeneratedMetadata
329
- | ScoredImageURLInputChunk.PdfChunkGeneratedMetadata
330
- | ScoredImageURLInputChunk.CodeChunkGeneratedMetadata
331
- | ScoredImageURLInputChunk.AudioChunkGeneratedMetadata
332
- | null;
333
-
334
- /**
335
- * model used for this chunk
336
- */
337
- model?: string | null;
338
-
339
- /**
340
- * score of the chunk
341
- */
342
- score: number;
343
-
344
- /**
345
- * file id
346
- */
347
- file_id: string;
348
-
349
- /**
350
- * filename
351
- */
352
- filename: string;
353
-
354
- /**
355
- * store id
356
- */
357
- store_id: string;
358
-
359
- /**
360
- * file metadata
361
- */
362
- metadata?: unknown;
363
-
364
- /**
365
- * Input type identifier
366
- */
367
- type?: 'image_url';
368
-
369
- /**
370
- * ocr text of the image
371
- */
372
- ocr_text?: string | null;
373
-
374
- /**
375
- * summary of the image
376
- */
377
- summary?: string | null;
378
-
379
- /**
380
- * The image input specification.
381
- */
382
- image_url: ScoredImageURLInputChunk.ImageURL;
383
- }
384
-
385
- export namespace ScoredImageURLInputChunk {
386
- export interface MarkdownChunkGeneratedMetadata {
387
- type?: 'markdown';
388
-
389
- file_type?: 'text/markdown';
390
-
391
- language: string;
392
-
393
- word_count: number;
394
-
395
- file_size: number;
396
-
397
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
398
-
399
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
400
-
401
- start_line?: number;
402
-
403
- num_lines?: number;
404
-
405
- [k: string]: unknown;
406
- }
407
-
408
- export namespace MarkdownChunkGeneratedMetadata {
409
- export interface ChunkHeading {
410
- level: number;
411
-
412
- text: string;
413
- }
414
-
415
- export interface HeadingContext {
416
- level: number;
417
-
418
- text: string;
419
- }
420
- }
421
-
422
- export interface TextChunkGeneratedMetadata {
423
- type?: 'text';
424
-
425
- file_type?: 'text/plain';
426
-
427
- language: string;
428
-
429
- word_count: number;
430
-
431
- file_size: number;
432
-
433
- start_line?: number;
434
-
435
- num_lines?: number;
436
-
437
- [k: string]: unknown;
438
- }
439
-
440
- export interface PdfChunkGeneratedMetadata {
441
- type?: 'pdf';
442
-
443
- file_type?: 'application/pdf';
444
-
445
- total_pages: number;
446
-
447
- total_size: number;
448
-
449
- [k: string]: unknown;
450
- }
451
-
452
- export interface CodeChunkGeneratedMetadata {
453
- type?: 'code';
454
-
455
- file_type: string;
456
-
457
- language: string;
458
-
459
- word_count: number;
460
-
461
- file_size: number;
462
-
463
- start_line?: number;
464
-
465
- num_lines?: number;
466
-
467
- [k: string]: unknown;
468
- }
469
-
470
- export interface AudioChunkGeneratedMetadata {
471
- type?: 'audio';
472
-
473
- file_type: string;
474
-
475
- file_size: number;
476
-
477
- total_duration_seconds: number;
478
-
479
- sample_rate: number;
480
-
481
- channels: number;
482
-
483
- audio_format: number;
484
-
485
- [k: string]: unknown;
486
- }
487
-
488
- /**
489
- * The image input specification.
490
- */
491
- export interface ImageURL {
492
- /**
493
- * The image URL. Can be either a URL or a Data URI.
494
- */
495
- url: string;
496
-
497
- /**
498
- * The image format/mimetype
499
- */
500
- format?: string;
501
- }
502
- }
503
-
504
- export interface ScoredTextInputChunk {
505
- /**
506
- * position of the chunk in a file
507
- */
508
- chunk_index: number;
509
-
510
- /**
511
- * mime type of the chunk
512
- */
513
- mime_type?: string;
514
-
515
- /**
516
- * metadata of the chunk
517
- */
518
- generated_metadata?:
519
- | ScoredTextInputChunk.MarkdownChunkGeneratedMetadata
520
- | ScoredTextInputChunk.TextChunkGeneratedMetadata
521
- | ScoredTextInputChunk.PdfChunkGeneratedMetadata
522
- | ScoredTextInputChunk.CodeChunkGeneratedMetadata
523
- | ScoredTextInputChunk.AudioChunkGeneratedMetadata
524
- | null;
525
-
526
- /**
527
- * model used for this chunk
528
- */
529
- model?: string | null;
530
-
531
- /**
532
- * score of the chunk
533
- */
534
- score: number;
535
-
536
- /**
537
- * file id
538
- */
539
- file_id: string;
540
-
541
- /**
542
- * filename
543
- */
544
- filename: string;
545
-
546
- /**
547
- * store id
548
- */
549
- store_id: string;
550
-
551
- /**
552
- * file metadata
553
- */
554
- metadata?: unknown;
555
-
556
- /**
557
- * Input type identifier
558
- */
559
- type?: 'text';
560
-
561
- /**
562
- * The offset of the text in the file relative to the start of the file.
563
- */
564
- offset?: number;
565
-
566
- /**
567
- * Text content to process
568
- */
569
- text: string;
570
- }
571
-
572
- export namespace ScoredTextInputChunk {
573
- export interface MarkdownChunkGeneratedMetadata {
574
- type?: 'markdown';
575
-
576
- file_type?: 'text/markdown';
577
-
578
- language: string;
579
-
580
- word_count: number;
581
-
582
- file_size: number;
583
-
584
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
585
-
586
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
587
-
588
- start_line?: number;
589
-
590
- num_lines?: number;
591
-
592
- [k: string]: unknown;
593
- }
594
-
595
- export namespace MarkdownChunkGeneratedMetadata {
596
- export interface ChunkHeading {
597
- level: number;
598
-
599
- text: string;
600
- }
601
-
602
- export interface HeadingContext {
603
- level: number;
604
-
605
- text: string;
606
- }
607
- }
608
-
609
- export interface TextChunkGeneratedMetadata {
610
- type?: 'text';
611
-
612
- file_type?: 'text/plain';
613
-
614
- language: string;
615
-
616
- word_count: number;
617
-
618
- file_size: number;
619
-
620
- start_line?: number;
621
-
622
- num_lines?: number;
623
-
624
- [k: string]: unknown;
625
- }
626
-
627
- export interface PdfChunkGeneratedMetadata {
628
- type?: 'pdf';
629
-
630
- file_type?: 'application/pdf';
631
-
632
- total_pages: number;
633
-
634
- total_size: number;
635
-
636
- [k: string]: unknown;
637
- }
638
-
639
- export interface CodeChunkGeneratedMetadata {
640
- type?: 'code';
641
-
642
- file_type: string;
643
-
644
- language: string;
645
-
646
- word_count: number;
647
-
648
- file_size: number;
649
-
650
- start_line?: number;
651
-
652
- num_lines?: number;
653
-
654
- [k: string]: unknown;
655
- }
656
-
657
- export interface AudioChunkGeneratedMetadata {
658
- type?: 'audio';
659
-
660
- file_type: string;
661
-
662
- file_size: number;
663
-
664
- total_duration_seconds: number;
665
-
666
- sample_rate: number;
667
-
668
- channels: number;
669
-
670
- audio_format: number;
671
-
672
- [k: string]: unknown;
673
- }
674
- }
675
-
676
- export interface ScoredVideoURLInputChunk {
677
- /**
678
- * position of the chunk in a file
679
- */
680
- chunk_index: number;
681
-
682
- /**
683
- * mime type of the chunk
684
- */
685
- mime_type?: string;
686
-
687
- /**
688
- * metadata of the chunk
689
- */
690
- generated_metadata?:
691
- | ScoredVideoURLInputChunk.MarkdownChunkGeneratedMetadata
692
- | ScoredVideoURLInputChunk.TextChunkGeneratedMetadata
693
- | ScoredVideoURLInputChunk.PdfChunkGeneratedMetadata
694
- | ScoredVideoURLInputChunk.CodeChunkGeneratedMetadata
695
- | ScoredVideoURLInputChunk.AudioChunkGeneratedMetadata
696
- | null;
697
-
698
- /**
699
- * model used for this chunk
700
- */
701
- model?: string | null;
702
-
703
- /**
704
- * score of the chunk
705
- */
706
- score: number;
707
-
708
- /**
709
- * file id
710
- */
711
- file_id: string;
712
-
713
- /**
714
- * filename
715
- */
716
- filename: string;
717
-
718
- /**
719
- * store id
720
- */
721
- store_id: string;
722
-
723
- /**
724
- * file metadata
725
- */
726
- metadata?: unknown;
727
-
728
- /**
729
- * Input type identifier
730
- */
731
- type?: 'video_url';
732
-
733
- /**
734
- * speech recognition (sr) text of the video
735
- */
736
- transcription?: string | null;
737
-
738
- /**
739
- * summary of the video
740
- */
741
- summary?: string | null;
742
-
743
- /**
744
- * The video input specification.
745
- */
746
- video_url: ScoredVideoURLInputChunk.VideoURL;
747
- }
748
-
749
- export namespace ScoredVideoURLInputChunk {
750
- export interface MarkdownChunkGeneratedMetadata {
751
- type?: 'markdown';
752
-
753
- file_type?: 'text/markdown';
754
-
755
- language: string;
756
-
757
- word_count: number;
758
-
759
- file_size: number;
760
-
761
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
762
-
763
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
764
-
765
- start_line?: number;
766
-
767
- num_lines?: number;
768
-
769
- [k: string]: unknown;
770
- }
771
-
772
- export namespace MarkdownChunkGeneratedMetadata {
773
- export interface ChunkHeading {
774
- level: number;
775
-
776
- text: string;
777
- }
778
-
779
- export interface HeadingContext {
780
- level: number;
781
-
782
- text: string;
783
- }
784
- }
785
-
786
- export interface TextChunkGeneratedMetadata {
787
- type?: 'text';
788
-
789
- file_type?: 'text/plain';
790
-
791
- language: string;
792
-
793
- word_count: number;
794
-
795
- file_size: number;
796
-
797
- start_line?: number;
798
-
799
- num_lines?: number;
800
-
801
- [k: string]: unknown;
802
- }
803
-
804
- export interface PdfChunkGeneratedMetadata {
805
- type?: 'pdf';
806
-
807
- file_type?: 'application/pdf';
808
-
809
- total_pages: number;
810
-
811
- total_size: number;
812
-
813
- [k: string]: unknown;
814
- }
815
-
816
- export interface CodeChunkGeneratedMetadata {
817
- type?: 'code';
818
-
819
- file_type: string;
820
-
821
- language: string;
822
-
823
- word_count: number;
824
-
825
- file_size: number;
826
-
827
- start_line?: number;
828
-
829
- num_lines?: number;
830
-
831
- [k: string]: unknown;
832
- }
833
-
834
- export interface AudioChunkGeneratedMetadata {
835
- type?: 'audio';
836
-
837
- file_type: string;
838
-
839
- file_size: number;
840
-
841
- total_duration_seconds: number;
842
-
843
- sample_rate: number;
844
-
845
- channels: number;
846
-
847
- audio_format: number;
848
-
849
- [k: string]: unknown;
850
- }
851
-
852
- /**
853
- * The video input specification.
854
- */
855
- export interface VideoURL {
856
- /**
857
- * The video URL. Can be either a URL or a Data URI.
858
- */
859
- url: string;
860
- }
861
- }
862
-
863
- /**
864
- * Model representing a vector store with its metadata and timestamps.
865
- */
866
- export interface VectorStore {
867
- /**
868
- * Unique identifier for the vector store
869
- */
870
- id: string;
871
-
872
- /**
873
- * Name of the vector store
874
- */
875
- name: string;
876
-
877
- /**
878
- * Detailed description of the vector store's purpose and contents
879
- */
880
- description?: string | null;
881
-
882
- /**
883
- * Whether the vector store can be accessed by anyone with valid login credentials
884
- */
885
- is_public?: boolean;
886
-
887
- /**
888
- * Additional metadata associated with the vector store
889
- */
890
- metadata?: unknown;
891
-
892
- /**
893
- * Counts of files in different states
894
- */
895
- file_counts?: VectorStore.FileCounts;
896
-
897
- /**
898
- * Represents an expiration policy for a store.
899
- */
900
- expires_after?: ExpiresAfter | null;
901
-
902
- /**
903
- * Processing status of the vector store
904
- */
905
- status?: 'expired' | 'in_progress' | 'completed';
906
-
907
- /**
908
- * Timestamp when the vector store was created
909
- */
910
- created_at: string;
911
-
912
- /**
913
- * Timestamp when the vector store was last updated
914
- */
915
- updated_at: string;
916
-
917
- /**
918
- * Timestamp when the vector store was last used
919
- */
920
- last_active_at?: string | null;
921
-
922
- /**
923
- * Total storage usage in bytes
924
- */
925
- usage_bytes?: number;
926
-
927
- /**
928
- * Optional expiration timestamp for the vector store
929
- */
930
- expires_at?: string | null;
931
-
932
- /**
933
- * Type of the object
934
- */
935
- object?: 'vector_store';
936
- }
937
-
938
- export namespace VectorStore {
939
- /**
940
- * Counts of files in different states
941
- */
942
- export interface FileCounts {
943
- /**
944
- * Number of files waiting to be processed
945
- */
946
- pending?: number;
947
-
948
- /**
949
- * Number of files currently being processed
950
- */
951
- in_progress?: number;
952
-
953
- /**
954
- * Number of files whose processing was cancelled
955
- */
956
- cancelled?: number;
957
-
958
- /**
959
- * Number of successfully processed files
960
- */
961
- completed?: number;
962
-
963
- /**
964
- * Number of files that failed processing
965
- */
966
- failed?: number;
967
-
968
- /**
969
- * Total number of files
970
- */
971
- total?: number;
972
- }
973
- }
974
-
975
- /**
976
- * Options for configuring vector store chunk searches.
977
- */
978
- export interface VectorStoreChunkSearchOptions {
979
- /**
980
- * Minimum similarity score threshold
981
- */
982
- score_threshold?: number;
983
-
984
- /**
985
- * Whether to rewrite the query. Ignored when agentic is enabled (the agent handles
986
- * query decomposition).
987
- */
988
- rewrite_query?: boolean;
989
-
990
- /**
991
- * Whether to rerank results and optional reranking configuration. Ignored when
992
- * agentic is enabled (the agent handles ranking).
993
- */
994
- rerank?: boolean | FilesAPI.RerankConfig | null;
995
-
996
- /**
997
- * Whether to use agentic multi-query search with automatic query decomposition and
998
- * ranking. When enabled, rewrite_query and rerank options are ignored.
999
- */
1000
- agentic?: boolean | VectorStoreChunkSearchOptions.AgenticSearchConfig | null;
1001
-
1002
- /**
1003
- * Whether to return file metadata
1004
- */
1005
- return_metadata?: boolean;
1006
-
1007
- /**
1008
- * Whether to apply search rules
1009
- */
1010
- apply_search_rules?: boolean;
1011
- }
1012
-
1013
- export namespace VectorStoreChunkSearchOptions {
1014
- /**
1015
- * Configuration for agentic multi-query search.
1016
- */
1017
- export interface AgenticSearchConfig {
1018
- /**
1019
- * Maximum number of search rounds
1020
- */
1021
- max_rounds?: number;
1022
-
1023
- /**
1024
- * Maximum queries per round
1025
- */
1026
- queries_per_round?: number;
1027
-
1028
- /**
1029
- * Results to fetch per query
1030
- */
1031
- results_per_query?: number;
1032
- }
1033
- }
1034
-
1035
- /**
1036
- * Response model for vector store deletion.
1037
- */
1038
- export interface VectorStoreDeleteResponse {
1039
- /**
1040
- * ID of the deleted vector store
1041
- */
1042
- id: string;
1043
-
1044
- /**
1045
- * Whether the deletion was successful
1046
- */
1047
- deleted: boolean;
1048
-
1049
- /**
1050
- * Type of the deleted object
1051
- */
1052
- object?: 'vector_store';
1053
- }
1054
-
1055
- /**
1056
- * Results from a question answering operation.
1057
- */
1058
- export interface VectorStoreQuestionAnsweringResponse {
1059
- /**
1060
- * The answer generated by the LLM
1061
- */
1062
- answer: string;
1063
-
1064
- /**
1065
- * Source documents used to generate the answer
1066
- */
1067
- sources?: Array<
1068
- | VectorStoreQuestionAnsweringResponse.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk
1069
- | VectorStoreQuestionAnsweringResponse.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk
1070
- | VectorStoreQuestionAnsweringResponse.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk
1071
- | VectorStoreQuestionAnsweringResponse.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk
1072
- >;
1073
- }
1074
-
1075
- export namespace VectorStoreQuestionAnsweringResponse {
1076
- /**
1077
- * Scored text chunk for deprecated API.
1078
- */
1079
- export interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk {
1080
- /**
1081
- * position of the chunk in a file
1082
- */
1083
- chunk_index: number;
1084
-
1085
- /**
1086
- * mime type of the chunk
1087
- */
1088
- mime_type?: string;
1089
-
1090
- /**
1091
- * metadata of the chunk
1092
- */
1093
- generated_metadata?:
1094
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.MarkdownChunkGeneratedMetadata
1095
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.TextChunkGeneratedMetadata
1096
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.PdfChunkGeneratedMetadata
1097
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.CodeChunkGeneratedMetadata
1098
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.AudioChunkGeneratedMetadata
1099
- | null;
1100
-
1101
- /**
1102
- * model used for this chunk
1103
- */
1104
- model?: string | null;
1105
-
1106
- /**
1107
- * score of the chunk
1108
- */
1109
- score: number;
1110
-
1111
- /**
1112
- * file id
1113
- */
1114
- file_id: string;
1115
-
1116
- /**
1117
- * filename
1118
- */
1119
- filename: string;
1120
-
1121
- /**
1122
- * store id
1123
- */
1124
- vector_store_id: string;
1125
-
1126
- /**
1127
- * file metadata
1128
- */
1129
- metadata?: unknown;
1130
-
1131
- /**
1132
- * Input type identifier
1133
- */
1134
- type?: 'text';
1135
-
1136
- /**
1137
- * The offset of the text in the file relative to the start of the file.
1138
- */
1139
- offset?: number;
1140
-
1141
- /**
1142
- * Text content to process
1143
- */
1144
- text: string;
1145
- }
1146
-
1147
- export namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk {
1148
- export interface MarkdownChunkGeneratedMetadata {
1149
- type?: 'markdown';
1150
-
1151
- file_type?: 'text/markdown';
1152
-
1153
- language: string;
1154
-
1155
- word_count: number;
1156
-
1157
- file_size: number;
1158
-
1159
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
1160
-
1161
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
1162
-
1163
- start_line?: number;
1164
-
1165
- num_lines?: number;
1166
-
1167
- [k: string]: unknown;
1168
- }
1169
-
1170
- export namespace MarkdownChunkGeneratedMetadata {
1171
- export interface ChunkHeading {
1172
- level: number;
1173
-
1174
- text: string;
1175
- }
1176
-
1177
- export interface HeadingContext {
1178
- level: number;
1179
-
1180
- text: string;
1181
- }
1182
- }
1183
-
1184
- export interface TextChunkGeneratedMetadata {
1185
- type?: 'text';
1186
-
1187
- file_type?: 'text/plain';
1188
-
1189
- language: string;
1190
-
1191
- word_count: number;
1192
-
1193
- file_size: number;
1194
-
1195
- start_line?: number;
1196
-
1197
- num_lines?: number;
1198
-
1199
- [k: string]: unknown;
1200
- }
1201
-
1202
- export interface PdfChunkGeneratedMetadata {
1203
- type?: 'pdf';
1204
-
1205
- file_type?: 'application/pdf';
1206
-
1207
- total_pages: number;
1208
-
1209
- total_size: number;
1210
-
1211
- [k: string]: unknown;
1212
- }
1213
-
1214
- export interface CodeChunkGeneratedMetadata {
1215
- type?: 'code';
1216
-
1217
- file_type: string;
1218
-
1219
- language: string;
1220
-
1221
- word_count: number;
1222
-
1223
- file_size: number;
1224
-
1225
- start_line?: number;
1226
-
1227
- num_lines?: number;
1228
-
1229
- [k: string]: unknown;
1230
- }
1231
-
1232
- export interface AudioChunkGeneratedMetadata {
1233
- type?: 'audio';
1234
-
1235
- file_type: string;
1236
-
1237
- file_size: number;
1238
-
1239
- total_duration_seconds: number;
1240
-
1241
- sample_rate: number;
1242
-
1243
- channels: number;
1244
-
1245
- audio_format: number;
1246
-
1247
- [k: string]: unknown;
1248
- }
1249
- }
1250
-
1251
- /**
1252
- * Scored image chunk for deprecated API.
1253
- */
1254
- export interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk {
1255
- /**
1256
- * position of the chunk in a file
1257
- */
1258
- chunk_index: number;
1259
-
1260
- /**
1261
- * mime type of the chunk
1262
- */
1263
- mime_type?: string;
1264
-
1265
- /**
1266
- * metadata of the chunk
1267
- */
1268
- generated_metadata?:
1269
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.MarkdownChunkGeneratedMetadata
1270
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.TextChunkGeneratedMetadata
1271
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.PdfChunkGeneratedMetadata
1272
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.CodeChunkGeneratedMetadata
1273
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.AudioChunkGeneratedMetadata
1274
- | null;
1275
-
1276
- /**
1277
- * model used for this chunk
1278
- */
1279
- model?: string | null;
1280
-
1281
- /**
1282
- * score of the chunk
1283
- */
1284
- score: number;
1285
-
1286
- /**
1287
- * file id
1288
- */
1289
- file_id: string;
1290
-
1291
- /**
1292
- * filename
1293
- */
1294
- filename: string;
1295
-
1296
- /**
1297
- * store id
1298
- */
1299
- vector_store_id: string;
1300
-
1301
- /**
1302
- * file metadata
1303
- */
1304
- metadata?: unknown;
1305
-
1306
- /**
1307
- * Input type identifier
1308
- */
1309
- type?: 'image_url';
1310
-
1311
- /**
1312
- * ocr text of the image
1313
- */
1314
- ocr_text?: string | null;
1315
-
1316
- /**
1317
- * summary of the image
1318
- */
1319
- summary?: string | null;
1320
-
1321
- /**
1322
- * The image input specification.
1323
- */
1324
- image_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.ImageURL;
1325
- }
1326
-
1327
- export namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk {
1328
- export interface MarkdownChunkGeneratedMetadata {
1329
- type?: 'markdown';
1330
-
1331
- file_type?: 'text/markdown';
1332
-
1333
- language: string;
1334
-
1335
- word_count: number;
1336
-
1337
- file_size: number;
1338
-
1339
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
1340
-
1341
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
1342
-
1343
- start_line?: number;
1344
-
1345
- num_lines?: number;
1346
-
1347
- [k: string]: unknown;
1348
- }
1349
-
1350
- export namespace MarkdownChunkGeneratedMetadata {
1351
- export interface ChunkHeading {
1352
- level: number;
1353
-
1354
- text: string;
1355
- }
1356
-
1357
- export interface HeadingContext {
1358
- level: number;
1359
-
1360
- text: string;
1361
- }
1362
- }
1363
-
1364
- export interface TextChunkGeneratedMetadata {
1365
- type?: 'text';
1366
-
1367
- file_type?: 'text/plain';
1368
-
1369
- language: string;
1370
-
1371
- word_count: number;
1372
-
1373
- file_size: number;
1374
-
1375
- start_line?: number;
1376
-
1377
- num_lines?: number;
1378
-
1379
- [k: string]: unknown;
1380
- }
1381
-
1382
- export interface PdfChunkGeneratedMetadata {
1383
- type?: 'pdf';
1384
-
1385
- file_type?: 'application/pdf';
1386
-
1387
- total_pages: number;
1388
-
1389
- total_size: number;
1390
-
1391
- [k: string]: unknown;
1392
- }
1393
-
1394
- export interface CodeChunkGeneratedMetadata {
1395
- type?: 'code';
1396
-
1397
- file_type: string;
1398
-
1399
- language: string;
1400
-
1401
- word_count: number;
1402
-
1403
- file_size: number;
1404
-
1405
- start_line?: number;
1406
-
1407
- num_lines?: number;
1408
-
1409
- [k: string]: unknown;
1410
- }
1411
-
1412
- export interface AudioChunkGeneratedMetadata {
1413
- type?: 'audio';
1414
-
1415
- file_type: string;
1416
-
1417
- file_size: number;
1418
-
1419
- total_duration_seconds: number;
1420
-
1421
- sample_rate: number;
1422
-
1423
- channels: number;
1424
-
1425
- audio_format: number;
1426
-
1427
- [k: string]: unknown;
1428
- }
1429
-
1430
- /**
1431
- * The image input specification.
1432
- */
1433
- export interface ImageURL {
1434
- /**
1435
- * The image URL. Can be either a URL or a Data URI.
1436
- */
1437
- url: string;
1438
-
1439
- /**
1440
- * The image format/mimetype
1441
- */
1442
- format?: string;
1443
- }
1444
- }
1445
-
1446
- /**
1447
- * Scored audio chunk for deprecated API.
1448
- */
1449
- export interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk {
1450
- /**
1451
- * position of the chunk in a file
1452
- */
1453
- chunk_index: number;
1454
-
1455
- /**
1456
- * mime type of the chunk
1457
- */
1458
- mime_type?: string;
1459
-
1460
- /**
1461
- * metadata of the chunk
1462
- */
1463
- generated_metadata?:
1464
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.MarkdownChunkGeneratedMetadata
1465
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.TextChunkGeneratedMetadata
1466
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.PdfChunkGeneratedMetadata
1467
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.CodeChunkGeneratedMetadata
1468
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.AudioChunkGeneratedMetadata
1469
- | null;
1470
-
1471
- /**
1472
- * model used for this chunk
1473
- */
1474
- model?: string | null;
1475
-
1476
- /**
1477
- * score of the chunk
1478
- */
1479
- score: number;
1480
-
1481
- /**
1482
- * file id
1483
- */
1484
- file_id: string;
1485
-
1486
- /**
1487
- * filename
1488
- */
1489
- filename: string;
1490
-
1491
- /**
1492
- * store id
1493
- */
1494
- vector_store_id: string;
1495
-
1496
- /**
1497
- * file metadata
1498
- */
1499
- metadata?: unknown;
1500
-
1501
- /**
1502
- * Input type identifier
1503
- */
1504
- type?: 'audio_url';
1505
-
1506
- /**
1507
- * speech recognition (sr) text of the audio
1508
- */
1509
- transcription?: string | null;
1510
-
1511
- /**
1512
- * summary of the audio
1513
- */
1514
- summary?: string | null;
1515
-
1516
- /**
1517
- * The audio input specification.
1518
- */
1519
- audio_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.AudioURL;
1520
-
1521
- /**
1522
- * The sampling rate of the audio.
1523
- */
1524
- sampling_rate: number;
1525
- }
1526
-
1527
- export namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk {
1528
- export interface MarkdownChunkGeneratedMetadata {
1529
- type?: 'markdown';
1530
-
1531
- file_type?: 'text/markdown';
1532
-
1533
- language: string;
1534
-
1535
- word_count: number;
1536
-
1537
- file_size: number;
1538
-
1539
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
1540
-
1541
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
1542
-
1543
- start_line?: number;
1544
-
1545
- num_lines?: number;
1546
-
1547
- [k: string]: unknown;
1548
- }
1549
-
1550
- export namespace MarkdownChunkGeneratedMetadata {
1551
- export interface ChunkHeading {
1552
- level: number;
1553
-
1554
- text: string;
1555
- }
1556
-
1557
- export interface HeadingContext {
1558
- level: number;
1559
-
1560
- text: string;
1561
- }
1562
- }
1563
-
1564
- export interface TextChunkGeneratedMetadata {
1565
- type?: 'text';
1566
-
1567
- file_type?: 'text/plain';
1568
-
1569
- language: string;
1570
-
1571
- word_count: number;
1572
-
1573
- file_size: number;
1574
-
1575
- start_line?: number;
1576
-
1577
- num_lines?: number;
1578
-
1579
- [k: string]: unknown;
1580
- }
1581
-
1582
- export interface PdfChunkGeneratedMetadata {
1583
- type?: 'pdf';
1584
-
1585
- file_type?: 'application/pdf';
1586
-
1587
- total_pages: number;
1588
-
1589
- total_size: number;
1590
-
1591
- [k: string]: unknown;
1592
- }
1593
-
1594
- export interface CodeChunkGeneratedMetadata {
1595
- type?: 'code';
1596
-
1597
- file_type: string;
1598
-
1599
- language: string;
1600
-
1601
- word_count: number;
1602
-
1603
- file_size: number;
1604
-
1605
- start_line?: number;
1606
-
1607
- num_lines?: number;
1608
-
1609
- [k: string]: unknown;
1610
- }
1611
-
1612
- export interface AudioChunkGeneratedMetadata {
1613
- type?: 'audio';
1614
-
1615
- file_type: string;
1616
-
1617
- file_size: number;
1618
-
1619
- total_duration_seconds: number;
1620
-
1621
- sample_rate: number;
1622
-
1623
- channels: number;
1624
-
1625
- audio_format: number;
1626
-
1627
- [k: string]: unknown;
1628
- }
1629
-
1630
- /**
1631
- * The audio input specification.
1632
- */
1633
- export interface AudioURL {
1634
- /**
1635
- * The audio URL. Can be either a URL or a Data URI.
1636
- */
1637
- url: string;
1638
- }
1639
- }
1640
-
1641
- /**
1642
- * Scored video chunk for deprecated API.
1643
- */
1644
- export interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk {
1645
- /**
1646
- * position of the chunk in a file
1647
- */
1648
- chunk_index: number;
1649
-
1650
- /**
1651
- * mime type of the chunk
1652
- */
1653
- mime_type?: string;
1654
-
1655
- /**
1656
- * metadata of the chunk
1657
- */
1658
- generated_metadata?:
1659
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.MarkdownChunkGeneratedMetadata
1660
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.TextChunkGeneratedMetadata
1661
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.PdfChunkGeneratedMetadata
1662
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.CodeChunkGeneratedMetadata
1663
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.AudioChunkGeneratedMetadata
1664
- | null;
1665
-
1666
- /**
1667
- * model used for this chunk
1668
- */
1669
- model?: string | null;
1670
-
1671
- /**
1672
- * score of the chunk
1673
- */
1674
- score: number;
1675
-
1676
- /**
1677
- * file id
1678
- */
1679
- file_id: string;
1680
-
1681
- /**
1682
- * filename
1683
- */
1684
- filename: string;
1685
-
1686
- /**
1687
- * store id
1688
- */
1689
- vector_store_id: string;
1690
-
1691
- /**
1692
- * file metadata
1693
- */
1694
- metadata?: unknown;
1695
-
1696
- /**
1697
- * Input type identifier
1698
- */
1699
- type?: 'video_url';
1700
-
1701
- /**
1702
- * speech recognition (sr) text of the video
1703
- */
1704
- transcription?: string | null;
1705
-
1706
- /**
1707
- * summary of the video
1708
- */
1709
- summary?: string | null;
1710
-
1711
- /**
1712
- * The video input specification.
1713
- */
1714
- video_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.VideoURL;
1715
- }
1716
-
1717
- export namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk {
1718
- export interface MarkdownChunkGeneratedMetadata {
1719
- type?: 'markdown';
1720
-
1721
- file_type?: 'text/markdown';
1722
-
1723
- language: string;
1724
-
1725
- word_count: number;
1726
-
1727
- file_size: number;
1728
-
1729
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
1730
-
1731
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
1732
-
1733
- start_line?: number;
1734
-
1735
- num_lines?: number;
1736
-
1737
- [k: string]: unknown;
1738
- }
1739
-
1740
- export namespace MarkdownChunkGeneratedMetadata {
1741
- export interface ChunkHeading {
1742
- level: number;
1743
-
1744
- text: string;
1745
- }
1746
-
1747
- export interface HeadingContext {
1748
- level: number;
1749
-
1750
- text: string;
1751
- }
1752
- }
1753
-
1754
- export interface TextChunkGeneratedMetadata {
1755
- type?: 'text';
1756
-
1757
- file_type?: 'text/plain';
1758
-
1759
- language: string;
1760
-
1761
- word_count: number;
1762
-
1763
- file_size: number;
1764
-
1765
- start_line?: number;
1766
-
1767
- num_lines?: number;
1768
-
1769
- [k: string]: unknown;
1770
- }
1771
-
1772
- export interface PdfChunkGeneratedMetadata {
1773
- type?: 'pdf';
1774
-
1775
- file_type?: 'application/pdf';
1776
-
1777
- total_pages: number;
1778
-
1779
- total_size: number;
1780
-
1781
- [k: string]: unknown;
1782
- }
1783
-
1784
- export interface CodeChunkGeneratedMetadata {
1785
- type?: 'code';
1786
-
1787
- file_type: string;
1788
-
1789
- language: string;
1790
-
1791
- word_count: number;
1792
-
1793
- file_size: number;
1794
-
1795
- start_line?: number;
1796
-
1797
- num_lines?: number;
1798
-
1799
- [k: string]: unknown;
1800
- }
1801
-
1802
- export interface AudioChunkGeneratedMetadata {
1803
- type?: 'audio';
1804
-
1805
- file_type: string;
1806
-
1807
- file_size: number;
1808
-
1809
- total_duration_seconds: number;
1810
-
1811
- sample_rate: number;
1812
-
1813
- channels: number;
1814
-
1815
- audio_format: number;
1816
-
1817
- [k: string]: unknown;
1818
- }
1819
-
1820
- /**
1821
- * The video input specification.
1822
- */
1823
- export interface VideoURL {
1824
- /**
1825
- * The video URL. Can be either a URL or a Data URI.
1826
- */
1827
- url: string;
1828
- }
1829
- }
1830
- }
1831
-
1832
- export interface VectorStoreSearchResponse {
1833
- /**
1834
- * The object type of the response
1835
- */
1836
- object?: 'list';
1837
-
1838
- /**
1839
- * The list of scored vector store file chunks
1840
- */
1841
- data: Array<
1842
- | VectorStoreSearchResponse.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk
1843
- | VectorStoreSearchResponse.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk
1844
- | VectorStoreSearchResponse.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk
1845
- | VectorStoreSearchResponse.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk
1846
- >;
1847
- }
1848
-
1849
- export namespace VectorStoreSearchResponse {
1850
- /**
1851
- * Scored text chunk for deprecated API.
1852
- */
1853
- export interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk {
1854
- /**
1855
- * position of the chunk in a file
1856
- */
1857
- chunk_index: number;
1858
-
1859
- /**
1860
- * mime type of the chunk
1861
- */
1862
- mime_type?: string;
1863
-
1864
- /**
1865
- * metadata of the chunk
1866
- */
1867
- generated_metadata?:
1868
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.MarkdownChunkGeneratedMetadata
1869
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.TextChunkGeneratedMetadata
1870
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.PdfChunkGeneratedMetadata
1871
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.CodeChunkGeneratedMetadata
1872
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.AudioChunkGeneratedMetadata
1873
- | null;
1874
-
1875
- /**
1876
- * model used for this chunk
1877
- */
1878
- model?: string | null;
1879
-
1880
- /**
1881
- * score of the chunk
1882
- */
1883
- score: number;
1884
-
1885
- /**
1886
- * file id
1887
- */
1888
- file_id: string;
1889
-
1890
- /**
1891
- * filename
1892
- */
1893
- filename: string;
1894
-
1895
- /**
1896
- * store id
1897
- */
1898
- vector_store_id: string;
1899
-
1900
- /**
1901
- * file metadata
1902
- */
1903
- metadata?: unknown;
1904
-
1905
- /**
1906
- * Input type identifier
1907
- */
1908
- type?: 'text';
1909
-
1910
- /**
1911
- * The offset of the text in the file relative to the start of the file.
1912
- */
1913
- offset?: number;
1914
-
1915
- /**
1916
- * Text content to process
1917
- */
1918
- text: string;
1919
- }
1920
-
1921
- export namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk {
1922
- export interface MarkdownChunkGeneratedMetadata {
1923
- type?: 'markdown';
1924
-
1925
- file_type?: 'text/markdown';
1926
-
1927
- language: string;
1928
-
1929
- word_count: number;
1930
-
1931
- file_size: number;
1932
-
1933
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
1934
-
1935
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
1936
-
1937
- start_line?: number;
1938
-
1939
- num_lines?: number;
1940
-
1941
- [k: string]: unknown;
1942
- }
1943
-
1944
- export namespace MarkdownChunkGeneratedMetadata {
1945
- export interface ChunkHeading {
1946
- level: number;
1947
-
1948
- text: string;
1949
- }
1950
-
1951
- export interface HeadingContext {
1952
- level: number;
1953
-
1954
- text: string;
1955
- }
1956
- }
1957
-
1958
- export interface TextChunkGeneratedMetadata {
1959
- type?: 'text';
1960
-
1961
- file_type?: 'text/plain';
1962
-
1963
- language: string;
1964
-
1965
- word_count: number;
1966
-
1967
- file_size: number;
1968
-
1969
- start_line?: number;
1970
-
1971
- num_lines?: number;
1972
-
1973
- [k: string]: unknown;
1974
- }
1975
-
1976
- export interface PdfChunkGeneratedMetadata {
1977
- type?: 'pdf';
1978
-
1979
- file_type?: 'application/pdf';
1980
-
1981
- total_pages: number;
1982
-
1983
- total_size: number;
1984
-
1985
- [k: string]: unknown;
1986
- }
1987
-
1988
- export interface CodeChunkGeneratedMetadata {
1989
- type?: 'code';
1990
-
1991
- file_type: string;
1992
-
1993
- language: string;
1994
-
1995
- word_count: number;
1996
-
1997
- file_size: number;
1998
-
1999
- start_line?: number;
2000
-
2001
- num_lines?: number;
2002
-
2003
- [k: string]: unknown;
2004
- }
2005
-
2006
- export interface AudioChunkGeneratedMetadata {
2007
- type?: 'audio';
2008
-
2009
- file_type: string;
2010
-
2011
- file_size: number;
2012
-
2013
- total_duration_seconds: number;
2014
-
2015
- sample_rate: number;
2016
-
2017
- channels: number;
2018
-
2019
- audio_format: number;
2020
-
2021
- [k: string]: unknown;
2022
- }
2023
- }
2024
-
2025
- /**
2026
- * Scored image chunk for deprecated API.
2027
- */
2028
- export interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk {
2029
- /**
2030
- * position of the chunk in a file
2031
- */
2032
- chunk_index: number;
2033
-
2034
- /**
2035
- * mime type of the chunk
2036
- */
2037
- mime_type?: string;
2038
-
2039
- /**
2040
- * metadata of the chunk
2041
- */
2042
- generated_metadata?:
2043
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.MarkdownChunkGeneratedMetadata
2044
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.TextChunkGeneratedMetadata
2045
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.PdfChunkGeneratedMetadata
2046
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.CodeChunkGeneratedMetadata
2047
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.AudioChunkGeneratedMetadata
2048
- | null;
2049
-
2050
- /**
2051
- * model used for this chunk
2052
- */
2053
- model?: string | null;
2054
-
2055
- /**
2056
- * score of the chunk
2057
- */
2058
- score: number;
2059
-
2060
- /**
2061
- * file id
2062
- */
2063
- file_id: string;
2064
-
2065
- /**
2066
- * filename
2067
- */
2068
- filename: string;
2069
-
2070
- /**
2071
- * store id
2072
- */
2073
- vector_store_id: string;
2074
-
2075
- /**
2076
- * file metadata
2077
- */
2078
- metadata?: unknown;
2079
-
2080
- /**
2081
- * Input type identifier
2082
- */
2083
- type?: 'image_url';
2084
-
2085
- /**
2086
- * ocr text of the image
2087
- */
2088
- ocr_text?: string | null;
2089
-
2090
- /**
2091
- * summary of the image
2092
- */
2093
- summary?: string | null;
2094
-
2095
- /**
2096
- * The image input specification.
2097
- */
2098
- image_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.ImageURL;
2099
- }
2100
-
2101
- export namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk {
2102
- export interface MarkdownChunkGeneratedMetadata {
2103
- type?: 'markdown';
2104
-
2105
- file_type?: 'text/markdown';
2106
-
2107
- language: string;
2108
-
2109
- word_count: number;
2110
-
2111
- file_size: number;
2112
-
2113
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
2114
-
2115
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
2116
-
2117
- start_line?: number;
2118
-
2119
- num_lines?: number;
2120
-
2121
- [k: string]: unknown;
2122
- }
2123
-
2124
- export namespace MarkdownChunkGeneratedMetadata {
2125
- export interface ChunkHeading {
2126
- level: number;
2127
-
2128
- text: string;
2129
- }
2130
-
2131
- export interface HeadingContext {
2132
- level: number;
2133
-
2134
- text: string;
2135
- }
2136
- }
2137
-
2138
- export interface TextChunkGeneratedMetadata {
2139
- type?: 'text';
2140
-
2141
- file_type?: 'text/plain';
2142
-
2143
- language: string;
2144
-
2145
- word_count: number;
2146
-
2147
- file_size: number;
2148
-
2149
- start_line?: number;
2150
-
2151
- num_lines?: number;
2152
-
2153
- [k: string]: unknown;
2154
- }
2155
-
2156
- export interface PdfChunkGeneratedMetadata {
2157
- type?: 'pdf';
2158
-
2159
- file_type?: 'application/pdf';
2160
-
2161
- total_pages: number;
2162
-
2163
- total_size: number;
2164
-
2165
- [k: string]: unknown;
2166
- }
2167
-
2168
- export interface CodeChunkGeneratedMetadata {
2169
- type?: 'code';
2170
-
2171
- file_type: string;
2172
-
2173
- language: string;
2174
-
2175
- word_count: number;
2176
-
2177
- file_size: number;
2178
-
2179
- start_line?: number;
2180
-
2181
- num_lines?: number;
2182
-
2183
- [k: string]: unknown;
2184
- }
2185
-
2186
- export interface AudioChunkGeneratedMetadata {
2187
- type?: 'audio';
2188
-
2189
- file_type: string;
2190
-
2191
- file_size: number;
2192
-
2193
- total_duration_seconds: number;
2194
-
2195
- sample_rate: number;
2196
-
2197
- channels: number;
2198
-
2199
- audio_format: number;
2200
-
2201
- [k: string]: unknown;
2202
- }
2203
-
2204
- /**
2205
- * The image input specification.
2206
- */
2207
- export interface ImageURL {
2208
- /**
2209
- * The image URL. Can be either a URL or a Data URI.
2210
- */
2211
- url: string;
2212
-
2213
- /**
2214
- * The image format/mimetype
2215
- */
2216
- format?: string;
2217
- }
2218
- }
2219
-
2220
- /**
2221
- * Scored audio chunk for deprecated API.
2222
- */
2223
- export interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk {
2224
- /**
2225
- * position of the chunk in a file
2226
- */
2227
- chunk_index: number;
2228
-
2229
- /**
2230
- * mime type of the chunk
2231
- */
2232
- mime_type?: string;
2233
-
2234
- /**
2235
- * metadata of the chunk
2236
- */
2237
- generated_metadata?:
2238
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.MarkdownChunkGeneratedMetadata
2239
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.TextChunkGeneratedMetadata
2240
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.PdfChunkGeneratedMetadata
2241
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.CodeChunkGeneratedMetadata
2242
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.AudioChunkGeneratedMetadata
2243
- | null;
2244
-
2245
- /**
2246
- * model used for this chunk
2247
- */
2248
- model?: string | null;
2249
-
2250
- /**
2251
- * score of the chunk
2252
- */
2253
- score: number;
2254
-
2255
- /**
2256
- * file id
2257
- */
2258
- file_id: string;
2259
-
2260
- /**
2261
- * filename
2262
- */
2263
- filename: string;
2264
-
2265
- /**
2266
- * store id
2267
- */
2268
- vector_store_id: string;
2269
-
2270
- /**
2271
- * file metadata
2272
- */
2273
- metadata?: unknown;
2274
-
2275
- /**
2276
- * Input type identifier
2277
- */
2278
- type?: 'audio_url';
2279
-
2280
- /**
2281
- * speech recognition (sr) text of the audio
2282
- */
2283
- transcription?: string | null;
2284
-
2285
- /**
2286
- * summary of the audio
2287
- */
2288
- summary?: string | null;
2289
-
2290
- /**
2291
- * The audio input specification.
2292
- */
2293
- audio_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.AudioURL;
2294
-
2295
- /**
2296
- * The sampling rate of the audio.
2297
- */
2298
- sampling_rate: number;
2299
- }
2300
-
2301
- export namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk {
2302
- export interface MarkdownChunkGeneratedMetadata {
2303
- type?: 'markdown';
2304
-
2305
- file_type?: 'text/markdown';
2306
-
2307
- language: string;
2308
-
2309
- word_count: number;
2310
-
2311
- file_size: number;
2312
-
2313
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
2314
-
2315
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
2316
-
2317
- start_line?: number;
2318
-
2319
- num_lines?: number;
2320
-
2321
- [k: string]: unknown;
2322
- }
2323
-
2324
- export namespace MarkdownChunkGeneratedMetadata {
2325
- export interface ChunkHeading {
2326
- level: number;
2327
-
2328
- text: string;
2329
- }
2330
-
2331
- export interface HeadingContext {
2332
- level: number;
2333
-
2334
- text: string;
2335
- }
2336
- }
2337
-
2338
- export interface TextChunkGeneratedMetadata {
2339
- type?: 'text';
2340
-
2341
- file_type?: 'text/plain';
2342
-
2343
- language: string;
2344
-
2345
- word_count: number;
2346
-
2347
- file_size: number;
2348
-
2349
- start_line?: number;
2350
-
2351
- num_lines?: number;
2352
-
2353
- [k: string]: unknown;
2354
- }
2355
-
2356
- export interface PdfChunkGeneratedMetadata {
2357
- type?: 'pdf';
2358
-
2359
- file_type?: 'application/pdf';
2360
-
2361
- total_pages: number;
2362
-
2363
- total_size: number;
2364
-
2365
- [k: string]: unknown;
2366
- }
2367
-
2368
- export interface CodeChunkGeneratedMetadata {
2369
- type?: 'code';
2370
-
2371
- file_type: string;
2372
-
2373
- language: string;
2374
-
2375
- word_count: number;
2376
-
2377
- file_size: number;
2378
-
2379
- start_line?: number;
2380
-
2381
- num_lines?: number;
2382
-
2383
- [k: string]: unknown;
2384
- }
2385
-
2386
- export interface AudioChunkGeneratedMetadata {
2387
- type?: 'audio';
2388
-
2389
- file_type: string;
2390
-
2391
- file_size: number;
2392
-
2393
- total_duration_seconds: number;
2394
-
2395
- sample_rate: number;
2396
-
2397
- channels: number;
2398
-
2399
- audio_format: number;
2400
-
2401
- [k: string]: unknown;
2402
- }
2403
-
2404
- /**
2405
- * The audio input specification.
2406
- */
2407
- export interface AudioURL {
2408
- /**
2409
- * The audio URL. Can be either a URL or a Data URI.
2410
- */
2411
- url: string;
2412
- }
2413
- }
2414
-
2415
- /**
2416
- * Scored video chunk for deprecated API.
2417
- */
2418
- export interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk {
2419
- /**
2420
- * position of the chunk in a file
2421
- */
2422
- chunk_index: number;
2423
-
2424
- /**
2425
- * mime type of the chunk
2426
- */
2427
- mime_type?: string;
2428
-
2429
- /**
2430
- * metadata of the chunk
2431
- */
2432
- generated_metadata?:
2433
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.MarkdownChunkGeneratedMetadata
2434
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.TextChunkGeneratedMetadata
2435
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.PdfChunkGeneratedMetadata
2436
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.CodeChunkGeneratedMetadata
2437
- | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.AudioChunkGeneratedMetadata
2438
- | null;
2439
-
2440
- /**
2441
- * model used for this chunk
2442
- */
2443
- model?: string | null;
2444
-
2445
- /**
2446
- * score of the chunk
2447
- */
2448
- score: number;
2449
-
2450
- /**
2451
- * file id
2452
- */
2453
- file_id: string;
2454
-
2455
- /**
2456
- * filename
2457
- */
2458
- filename: string;
2459
-
2460
- /**
2461
- * store id
2462
- */
2463
- vector_store_id: string;
2464
-
2465
- /**
2466
- * file metadata
2467
- */
2468
- metadata?: unknown;
2469
-
2470
- /**
2471
- * Input type identifier
2472
- */
2473
- type?: 'video_url';
2474
-
2475
- /**
2476
- * speech recognition (sr) text of the video
2477
- */
2478
- transcription?: string | null;
2479
-
2480
- /**
2481
- * summary of the video
2482
- */
2483
- summary?: string | null;
2484
-
2485
- /**
2486
- * The video input specification.
2487
- */
2488
- video_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.VideoURL;
2489
- }
2490
-
2491
- export namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk {
2492
- export interface MarkdownChunkGeneratedMetadata {
2493
- type?: 'markdown';
2494
-
2495
- file_type?: 'text/markdown';
2496
-
2497
- language: string;
2498
-
2499
- word_count: number;
2500
-
2501
- file_size: number;
2502
-
2503
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
2504
-
2505
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
2506
-
2507
- start_line?: number;
2508
-
2509
- num_lines?: number;
2510
-
2511
- [k: string]: unknown;
2512
- }
2513
-
2514
- export namespace MarkdownChunkGeneratedMetadata {
2515
- export interface ChunkHeading {
2516
- level: number;
2517
-
2518
- text: string;
2519
- }
2520
-
2521
- export interface HeadingContext {
2522
- level: number;
2523
-
2524
- text: string;
2525
- }
2526
- }
2527
-
2528
- export interface TextChunkGeneratedMetadata {
2529
- type?: 'text';
2530
-
2531
- file_type?: 'text/plain';
2532
-
2533
- language: string;
2534
-
2535
- word_count: number;
2536
-
2537
- file_size: number;
2538
-
2539
- start_line?: number;
2540
-
2541
- num_lines?: number;
2542
-
2543
- [k: string]: unknown;
2544
- }
2545
-
2546
- export interface PdfChunkGeneratedMetadata {
2547
- type?: 'pdf';
2548
-
2549
- file_type?: 'application/pdf';
2550
-
2551
- total_pages: number;
2552
-
2553
- total_size: number;
2554
-
2555
- [k: string]: unknown;
2556
- }
2557
-
2558
- export interface CodeChunkGeneratedMetadata {
2559
- type?: 'code';
2560
-
2561
- file_type: string;
2562
-
2563
- language: string;
2564
-
2565
- word_count: number;
2566
-
2567
- file_size: number;
2568
-
2569
- start_line?: number;
2570
-
2571
- num_lines?: number;
2572
-
2573
- [k: string]: unknown;
2574
- }
2575
-
2576
- export interface AudioChunkGeneratedMetadata {
2577
- type?: 'audio';
2578
-
2579
- file_type: string;
2580
-
2581
- file_size: number;
2582
-
2583
- total_duration_seconds: number;
2584
-
2585
- sample_rate: number;
2586
-
2587
- channels: number;
2588
-
2589
- audio_format: number;
2590
-
2591
- [k: string]: unknown;
2592
- }
2593
-
2594
- /**
2595
- * The video input specification.
2596
- */
2597
- export interface VideoURL {
2598
- /**
2599
- * The video URL. Can be either a URL or a Data URI.
2600
- */
2601
- url: string;
2602
- }
2603
- }
2604
- }
2605
-
2606
- export interface VectorStoreCreateParams {
2607
- /**
2608
- * Name for the new vector store
2609
- */
2610
- name?: string | null;
2611
-
2612
- /**
2613
- * Description of the vector store
2614
- */
2615
- description?: string | null;
2616
-
2617
- /**
2618
- * Whether the vector store can be accessed by anyone with valid login credentials
2619
- */
2620
- is_public?: boolean;
2621
-
2622
- /**
2623
- * Represents an expiration policy for a store.
2624
- */
2625
- expires_after?: ExpiresAfter | null;
2626
-
2627
- /**
2628
- * Optional metadata key-value pairs
2629
- */
2630
- metadata?: unknown;
2631
-
2632
- /**
2633
- * Optional list of file IDs
2634
- */
2635
- file_ids?: Array<string> | null;
2636
- }
2637
-
2638
- export interface VectorStoreUpdateParams {
2639
- /**
2640
- * New name for the store
2641
- */
2642
- name?: string | null;
2643
-
2644
- /**
2645
- * New description
2646
- */
2647
- description?: string | null;
2648
-
2649
- /**
2650
- * Whether the vector store can be accessed by anyone with valid login credentials
2651
- */
2652
- is_public?: boolean | null;
2653
-
2654
- /**
2655
- * Represents an expiration policy for a store.
2656
- */
2657
- expires_after?: ExpiresAfter | null;
2658
-
2659
- /**
2660
- * Optional metadata key-value pairs
2661
- */
2662
- metadata?: unknown;
2663
- }
2664
-
2665
- export interface VectorStoreListParams extends CursorParams {
2666
- /**
2667
- * Search query for fuzzy matching over name and description fields
2668
- */
2669
- q?: string | null;
2670
- }
2671
-
2672
- export interface VectorStoreQuestionAnsweringParams {
2673
- /**
2674
- * Question to answer. If not provided, the question will be extracted from the
2675
- * passed messages.
2676
- */
2677
- query?: string;
2678
-
2679
- /**
2680
- * IDs or names of vector stores to search
2681
- */
2682
- vector_store_identifiers: Array<string>;
2683
-
2684
- /**
2685
- * Number of results to return
2686
- */
2687
- top_k?: number;
2688
-
2689
- /**
2690
- * Optional filter conditions
2691
- */
2692
- filters?:
2693
- | Shared.SearchFilter
2694
- | Shared.SearchFilterCondition
2695
- | Array<Shared.SearchFilter | Shared.SearchFilterCondition>
2696
- | null;
2697
-
2698
- /**
2699
- * Optional list of file IDs to filter chunks by (inclusion filter)
2700
- */
2701
- file_ids?: Array<unknown> | Array<string> | null;
2702
-
2703
- /**
2704
- * Search configuration options
2705
- */
2706
- search_options?: VectorStoreChunkSearchOptions;
2707
-
2708
- /**
2709
- * Whether to stream the answer
2710
- */
2711
- stream?: boolean;
2712
-
2713
- /**
2714
- * Question answering configuration options
2715
- */
2716
- qa_options?: VectorStoreQuestionAnsweringParams.QaOptions;
2717
- }
2718
-
2719
- export namespace VectorStoreQuestionAnsweringParams {
2720
- /**
2721
- * Question answering configuration options
2722
- */
2723
- export interface QaOptions {
2724
- /**
2725
- * Whether to use citations
2726
- */
2727
- cite?: boolean;
2728
-
2729
- /**
2730
- * Whether to use multimodal context
2731
- */
2732
- multimodal?: boolean;
2733
- }
2734
- }
2735
-
2736
- export interface VectorStoreSearchParams {
2737
- /**
2738
- * Search query text
2739
- */
2740
- query: string;
2741
-
2742
- /**
2743
- * IDs or names of vector stores to search
2744
- */
2745
- vector_store_identifiers: Array<string>;
2746
-
2747
- /**
2748
- * Number of results to return
2749
- */
2750
- top_k?: number;
2751
-
2752
- /**
2753
- * Optional filter conditions
2754
- */
2755
- filters?:
2756
- | Shared.SearchFilter
2757
- | Shared.SearchFilterCondition
2758
- | Array<Shared.SearchFilter | Shared.SearchFilterCondition>
2759
- | null;
2760
-
2761
- /**
2762
- * Optional list of file IDs to filter chunks by (inclusion filter)
2763
- */
2764
- file_ids?: Array<unknown> | Array<string> | null;
2765
-
2766
- /**
2767
- * Search configuration options
2768
- */
2769
- search_options?: VectorStoreChunkSearchOptions;
2770
- }
2771
-
2772
- VectorStores.Files = Files;
2773
-
2774
- export declare namespace VectorStores {
2775
- export {
2776
- type ExpiresAfter as ExpiresAfter,
2777
- type ScoredAudioURLInputChunk as ScoredAudioURLInputChunk,
2778
- type ScoredImageURLInputChunk as ScoredImageURLInputChunk,
2779
- type ScoredTextInputChunk as ScoredTextInputChunk,
2780
- type ScoredVideoURLInputChunk as ScoredVideoURLInputChunk,
2781
- type VectorStore as VectorStore,
2782
- type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions,
2783
- type VectorStoreDeleteResponse as VectorStoreDeleteResponse,
2784
- type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse,
2785
- type VectorStoreSearchResponse as VectorStoreSearchResponse,
2786
- type VectorStoresCursor as VectorStoresCursor,
2787
- type VectorStoreCreateParams as VectorStoreCreateParams,
2788
- type VectorStoreUpdateParams as VectorStoreUpdateParams,
2789
- type VectorStoreListParams as VectorStoreListParams,
2790
- type VectorStoreQuestionAnsweringParams as VectorStoreQuestionAnsweringParams,
2791
- type VectorStoreSearchParams as VectorStoreSearchParams,
2792
- };
2793
-
2794
- export {
2795
- Files as Files,
2796
- type RerankConfig as RerankConfig,
2797
- type ScoredVectorStoreFile as ScoredVectorStoreFile,
2798
- type VectorStoreFileStatus as VectorStoreFileStatus,
2799
- type VectorStoreFile as VectorStoreFile,
2800
- type FileListResponse as FileListResponse,
2801
- type FileDeleteResponse as FileDeleteResponse,
2802
- type FileSearchResponse as FileSearchResponse,
2803
- type FileCreateParams as FileCreateParams,
2804
- type FileRetrieveParams as FileRetrieveParams,
2805
- type FileListParams as FileListParams,
2806
- type FileDeleteParams as FileDeleteParams,
2807
- type FileSearchParams as FileSearchParams,
2808
- };
2809
- }