@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,1885 +0,0 @@
1
- import { APIResource } from "../../core/resource.js";
2
- import * as Shared from "../shared.js";
3
- import * as FilesAPI from "./files.js";
4
- import { FileCreateParams, FileDeleteParams, FileDeleteResponse, FileListParams, FileListResponse, FileRetrieveParams, FileSearchParams, FileSearchResponse, Files, RerankConfig, ScoredVectorStoreFile, VectorStoreFile, VectorStoreFileStatus } from "./files.js";
5
- import { APIPromise } from "../../core/api-promise.js";
6
- import { Cursor, type CursorParams, PagePromise } from "../../core/pagination.js";
7
- import { RequestOptions } from "../../internal/request-options.js";
8
- export declare class VectorStores extends APIResource {
9
- files: FilesAPI.Files;
10
- /**
11
- * DEPRECATED: Use POST /stores instead
12
- *
13
- * @deprecated Use stores instead
14
- */
15
- create(body: VectorStoreCreateParams, options?: RequestOptions): APIPromise<VectorStore>;
16
- /**
17
- * DEPRECATED: Use GET /stores/{store_identifier} instead
18
- *
19
- * @deprecated Use stores instead
20
- */
21
- retrieve(vectorStoreIdentifier: string, options?: RequestOptions): APIPromise<VectorStore>;
22
- /**
23
- * DEPRECATED: Use PUT /stores/{store_identifier} instead
24
- *
25
- * @deprecated Use stores instead
26
- */
27
- update(vectorStoreIdentifier: string, body: VectorStoreUpdateParams, options?: RequestOptions): APIPromise<VectorStore>;
28
- /**
29
- * DEPRECATED: Use GET /stores instead
30
- *
31
- * @deprecated Use stores instead
32
- */
33
- list(query?: VectorStoreListParams | null | undefined, options?: RequestOptions): PagePromise<VectorStoresCursor, VectorStore>;
34
- /**
35
- * DEPRECATED: Use DELETE /stores/{store_identifier} instead
36
- *
37
- * @deprecated Use stores instead
38
- */
39
- delete(vectorStoreIdentifier: string, options?: RequestOptions): APIPromise<VectorStoreDeleteResponse>;
40
- /**
41
- * DEPRECATED: Use POST /stores/question-answering instead
42
- *
43
- * @deprecated Use stores.question_answering instead
44
- */
45
- questionAnswering(body: VectorStoreQuestionAnsweringParams, options?: RequestOptions): APIPromise<VectorStoreQuestionAnsweringResponse>;
46
- /**
47
- * DEPRECATED: Use POST /stores/search instead
48
- *
49
- * @deprecated Use stores.search instead
50
- */
51
- search(body: VectorStoreSearchParams, options?: RequestOptions): APIPromise<VectorStoreSearchResponse>;
52
- }
53
- export type VectorStoresCursor = Cursor<VectorStore>;
54
- /**
55
- * Represents an expiration policy for a store.
56
- */
57
- export interface ExpiresAfter {
58
- /**
59
- * Anchor date for the expiration policy
60
- */
61
- anchor?: 'last_active_at';
62
- /**
63
- * Number of days after which the store expires
64
- */
65
- days?: number;
66
- }
67
- export interface ScoredAudioURLInputChunk {
68
- /**
69
- * position of the chunk in a file
70
- */
71
- chunk_index: number;
72
- /**
73
- * mime type of the chunk
74
- */
75
- mime_type?: string;
76
- /**
77
- * metadata of the chunk
78
- */
79
- generated_metadata?: ScoredAudioURLInputChunk.MarkdownChunkGeneratedMetadata | ScoredAudioURLInputChunk.TextChunkGeneratedMetadata | ScoredAudioURLInputChunk.PdfChunkGeneratedMetadata | ScoredAudioURLInputChunk.CodeChunkGeneratedMetadata | ScoredAudioURLInputChunk.AudioChunkGeneratedMetadata | null;
80
- /**
81
- * model used for this chunk
82
- */
83
- model?: string | null;
84
- /**
85
- * score of the chunk
86
- */
87
- score: number;
88
- /**
89
- * file id
90
- */
91
- file_id: string;
92
- /**
93
- * filename
94
- */
95
- filename: string;
96
- /**
97
- * store id
98
- */
99
- store_id: string;
100
- /**
101
- * file metadata
102
- */
103
- metadata?: unknown;
104
- /**
105
- * Input type identifier
106
- */
107
- type?: 'audio_url';
108
- /**
109
- * speech recognition (sr) text of the audio
110
- */
111
- transcription?: string | null;
112
- /**
113
- * summary of the audio
114
- */
115
- summary?: string | null;
116
- /**
117
- * The audio input specification.
118
- */
119
- audio_url: ScoredAudioURLInputChunk.AudioURL;
120
- /**
121
- * The sampling rate of the audio.
122
- */
123
- sampling_rate: number;
124
- }
125
- export declare namespace ScoredAudioURLInputChunk {
126
- interface MarkdownChunkGeneratedMetadata {
127
- type?: 'markdown';
128
- file_type?: 'text/markdown';
129
- language: string;
130
- word_count: number;
131
- file_size: number;
132
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
133
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
134
- start_line?: number;
135
- num_lines?: number;
136
- [k: string]: unknown;
137
- }
138
- namespace MarkdownChunkGeneratedMetadata {
139
- interface ChunkHeading {
140
- level: number;
141
- text: string;
142
- }
143
- interface HeadingContext {
144
- level: number;
145
- text: string;
146
- }
147
- }
148
- interface TextChunkGeneratedMetadata {
149
- type?: 'text';
150
- file_type?: 'text/plain';
151
- language: string;
152
- word_count: number;
153
- file_size: number;
154
- start_line?: number;
155
- num_lines?: number;
156
- [k: string]: unknown;
157
- }
158
- interface PdfChunkGeneratedMetadata {
159
- type?: 'pdf';
160
- file_type?: 'application/pdf';
161
- total_pages: number;
162
- total_size: number;
163
- [k: string]: unknown;
164
- }
165
- interface CodeChunkGeneratedMetadata {
166
- type?: 'code';
167
- file_type: string;
168
- language: string;
169
- word_count: number;
170
- file_size: number;
171
- start_line?: number;
172
- num_lines?: number;
173
- [k: string]: unknown;
174
- }
175
- interface AudioChunkGeneratedMetadata {
176
- type?: 'audio';
177
- file_type: string;
178
- file_size: number;
179
- total_duration_seconds: number;
180
- sample_rate: number;
181
- channels: number;
182
- audio_format: number;
183
- [k: string]: unknown;
184
- }
185
- /**
186
- * The audio input specification.
187
- */
188
- interface AudioURL {
189
- /**
190
- * The audio URL. Can be either a URL or a Data URI.
191
- */
192
- url: string;
193
- }
194
- }
195
- export interface ScoredImageURLInputChunk {
196
- /**
197
- * position of the chunk in a file
198
- */
199
- chunk_index: number;
200
- /**
201
- * mime type of the chunk
202
- */
203
- mime_type?: string;
204
- /**
205
- * metadata of the chunk
206
- */
207
- generated_metadata?: ScoredImageURLInputChunk.MarkdownChunkGeneratedMetadata | ScoredImageURLInputChunk.TextChunkGeneratedMetadata | ScoredImageURLInputChunk.PdfChunkGeneratedMetadata | ScoredImageURLInputChunk.CodeChunkGeneratedMetadata | ScoredImageURLInputChunk.AudioChunkGeneratedMetadata | null;
208
- /**
209
- * model used for this chunk
210
- */
211
- model?: string | null;
212
- /**
213
- * score of the chunk
214
- */
215
- score: number;
216
- /**
217
- * file id
218
- */
219
- file_id: string;
220
- /**
221
- * filename
222
- */
223
- filename: string;
224
- /**
225
- * store id
226
- */
227
- store_id: string;
228
- /**
229
- * file metadata
230
- */
231
- metadata?: unknown;
232
- /**
233
- * Input type identifier
234
- */
235
- type?: 'image_url';
236
- /**
237
- * ocr text of the image
238
- */
239
- ocr_text?: string | null;
240
- /**
241
- * summary of the image
242
- */
243
- summary?: string | null;
244
- /**
245
- * The image input specification.
246
- */
247
- image_url: ScoredImageURLInputChunk.ImageURL;
248
- }
249
- export declare namespace ScoredImageURLInputChunk {
250
- interface MarkdownChunkGeneratedMetadata {
251
- type?: 'markdown';
252
- file_type?: 'text/markdown';
253
- language: string;
254
- word_count: number;
255
- file_size: number;
256
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
257
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
258
- start_line?: number;
259
- num_lines?: number;
260
- [k: string]: unknown;
261
- }
262
- namespace MarkdownChunkGeneratedMetadata {
263
- interface ChunkHeading {
264
- level: number;
265
- text: string;
266
- }
267
- interface HeadingContext {
268
- level: number;
269
- text: string;
270
- }
271
- }
272
- interface TextChunkGeneratedMetadata {
273
- type?: 'text';
274
- file_type?: 'text/plain';
275
- language: string;
276
- word_count: number;
277
- file_size: number;
278
- start_line?: number;
279
- num_lines?: number;
280
- [k: string]: unknown;
281
- }
282
- interface PdfChunkGeneratedMetadata {
283
- type?: 'pdf';
284
- file_type?: 'application/pdf';
285
- total_pages: number;
286
- total_size: number;
287
- [k: string]: unknown;
288
- }
289
- interface CodeChunkGeneratedMetadata {
290
- type?: 'code';
291
- file_type: string;
292
- language: string;
293
- word_count: number;
294
- file_size: number;
295
- start_line?: number;
296
- num_lines?: number;
297
- [k: string]: unknown;
298
- }
299
- interface AudioChunkGeneratedMetadata {
300
- type?: 'audio';
301
- file_type: string;
302
- file_size: number;
303
- total_duration_seconds: number;
304
- sample_rate: number;
305
- channels: number;
306
- audio_format: number;
307
- [k: string]: unknown;
308
- }
309
- /**
310
- * The image input specification.
311
- */
312
- interface ImageURL {
313
- /**
314
- * The image URL. Can be either a URL or a Data URI.
315
- */
316
- url: string;
317
- /**
318
- * The image format/mimetype
319
- */
320
- format?: string;
321
- }
322
- }
323
- export interface ScoredTextInputChunk {
324
- /**
325
- * position of the chunk in a file
326
- */
327
- chunk_index: number;
328
- /**
329
- * mime type of the chunk
330
- */
331
- mime_type?: string;
332
- /**
333
- * metadata of the chunk
334
- */
335
- generated_metadata?: ScoredTextInputChunk.MarkdownChunkGeneratedMetadata | ScoredTextInputChunk.TextChunkGeneratedMetadata | ScoredTextInputChunk.PdfChunkGeneratedMetadata | ScoredTextInputChunk.CodeChunkGeneratedMetadata | ScoredTextInputChunk.AudioChunkGeneratedMetadata | null;
336
- /**
337
- * model used for this chunk
338
- */
339
- model?: string | null;
340
- /**
341
- * score of the chunk
342
- */
343
- score: number;
344
- /**
345
- * file id
346
- */
347
- file_id: string;
348
- /**
349
- * filename
350
- */
351
- filename: string;
352
- /**
353
- * store id
354
- */
355
- store_id: string;
356
- /**
357
- * file metadata
358
- */
359
- metadata?: unknown;
360
- /**
361
- * Input type identifier
362
- */
363
- type?: 'text';
364
- /**
365
- * The offset of the text in the file relative to the start of the file.
366
- */
367
- offset?: number;
368
- /**
369
- * Text content to process
370
- */
371
- text: string;
372
- }
373
- export declare namespace ScoredTextInputChunk {
374
- interface MarkdownChunkGeneratedMetadata {
375
- type?: 'markdown';
376
- file_type?: 'text/markdown';
377
- language: string;
378
- word_count: number;
379
- file_size: number;
380
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
381
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
382
- start_line?: number;
383
- num_lines?: number;
384
- [k: string]: unknown;
385
- }
386
- namespace MarkdownChunkGeneratedMetadata {
387
- interface ChunkHeading {
388
- level: number;
389
- text: string;
390
- }
391
- interface HeadingContext {
392
- level: number;
393
- text: string;
394
- }
395
- }
396
- interface TextChunkGeneratedMetadata {
397
- type?: 'text';
398
- file_type?: 'text/plain';
399
- language: string;
400
- word_count: number;
401
- file_size: number;
402
- start_line?: number;
403
- num_lines?: number;
404
- [k: string]: unknown;
405
- }
406
- interface PdfChunkGeneratedMetadata {
407
- type?: 'pdf';
408
- file_type?: 'application/pdf';
409
- total_pages: number;
410
- total_size: number;
411
- [k: string]: unknown;
412
- }
413
- interface CodeChunkGeneratedMetadata {
414
- type?: 'code';
415
- file_type: string;
416
- language: string;
417
- word_count: number;
418
- file_size: number;
419
- start_line?: number;
420
- num_lines?: number;
421
- [k: string]: unknown;
422
- }
423
- interface AudioChunkGeneratedMetadata {
424
- type?: 'audio';
425
- file_type: string;
426
- file_size: number;
427
- total_duration_seconds: number;
428
- sample_rate: number;
429
- channels: number;
430
- audio_format: number;
431
- [k: string]: unknown;
432
- }
433
- }
434
- export interface ScoredVideoURLInputChunk {
435
- /**
436
- * position of the chunk in a file
437
- */
438
- chunk_index: number;
439
- /**
440
- * mime type of the chunk
441
- */
442
- mime_type?: string;
443
- /**
444
- * metadata of the chunk
445
- */
446
- generated_metadata?: ScoredVideoURLInputChunk.MarkdownChunkGeneratedMetadata | ScoredVideoURLInputChunk.TextChunkGeneratedMetadata | ScoredVideoURLInputChunk.PdfChunkGeneratedMetadata | ScoredVideoURLInputChunk.CodeChunkGeneratedMetadata | ScoredVideoURLInputChunk.AudioChunkGeneratedMetadata | null;
447
- /**
448
- * model used for this chunk
449
- */
450
- model?: string | null;
451
- /**
452
- * score of the chunk
453
- */
454
- score: number;
455
- /**
456
- * file id
457
- */
458
- file_id: string;
459
- /**
460
- * filename
461
- */
462
- filename: string;
463
- /**
464
- * store id
465
- */
466
- store_id: string;
467
- /**
468
- * file metadata
469
- */
470
- metadata?: unknown;
471
- /**
472
- * Input type identifier
473
- */
474
- type?: 'video_url';
475
- /**
476
- * speech recognition (sr) text of the video
477
- */
478
- transcription?: string | null;
479
- /**
480
- * summary of the video
481
- */
482
- summary?: string | null;
483
- /**
484
- * The video input specification.
485
- */
486
- video_url: ScoredVideoURLInputChunk.VideoURL;
487
- }
488
- export declare namespace ScoredVideoURLInputChunk {
489
- interface MarkdownChunkGeneratedMetadata {
490
- type?: 'markdown';
491
- file_type?: 'text/markdown';
492
- language: string;
493
- word_count: number;
494
- file_size: number;
495
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
496
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
497
- start_line?: number;
498
- num_lines?: number;
499
- [k: string]: unknown;
500
- }
501
- namespace MarkdownChunkGeneratedMetadata {
502
- interface ChunkHeading {
503
- level: number;
504
- text: string;
505
- }
506
- interface HeadingContext {
507
- level: number;
508
- text: string;
509
- }
510
- }
511
- interface TextChunkGeneratedMetadata {
512
- type?: 'text';
513
- file_type?: 'text/plain';
514
- language: string;
515
- word_count: number;
516
- file_size: number;
517
- start_line?: number;
518
- num_lines?: number;
519
- [k: string]: unknown;
520
- }
521
- interface PdfChunkGeneratedMetadata {
522
- type?: 'pdf';
523
- file_type?: 'application/pdf';
524
- total_pages: number;
525
- total_size: number;
526
- [k: string]: unknown;
527
- }
528
- interface CodeChunkGeneratedMetadata {
529
- type?: 'code';
530
- file_type: string;
531
- language: string;
532
- word_count: number;
533
- file_size: number;
534
- start_line?: number;
535
- num_lines?: number;
536
- [k: string]: unknown;
537
- }
538
- interface AudioChunkGeneratedMetadata {
539
- type?: 'audio';
540
- file_type: string;
541
- file_size: number;
542
- total_duration_seconds: number;
543
- sample_rate: number;
544
- channels: number;
545
- audio_format: number;
546
- [k: string]: unknown;
547
- }
548
- /**
549
- * The video input specification.
550
- */
551
- interface VideoURL {
552
- /**
553
- * The video URL. Can be either a URL or a Data URI.
554
- */
555
- url: string;
556
- }
557
- }
558
- /**
559
- * Model representing a vector store with its metadata and timestamps.
560
- */
561
- export interface VectorStore {
562
- /**
563
- * Unique identifier for the vector store
564
- */
565
- id: string;
566
- /**
567
- * Name of the vector store
568
- */
569
- name: string;
570
- /**
571
- * Detailed description of the vector store's purpose and contents
572
- */
573
- description?: string | null;
574
- /**
575
- * Whether the vector store can be accessed by anyone with valid login credentials
576
- */
577
- is_public?: boolean;
578
- /**
579
- * Additional metadata associated with the vector store
580
- */
581
- metadata?: unknown;
582
- /**
583
- * Counts of files in different states
584
- */
585
- file_counts?: VectorStore.FileCounts;
586
- /**
587
- * Represents an expiration policy for a store.
588
- */
589
- expires_after?: ExpiresAfter | null;
590
- /**
591
- * Processing status of the vector store
592
- */
593
- status?: 'expired' | 'in_progress' | 'completed';
594
- /**
595
- * Timestamp when the vector store was created
596
- */
597
- created_at: string;
598
- /**
599
- * Timestamp when the vector store was last updated
600
- */
601
- updated_at: string;
602
- /**
603
- * Timestamp when the vector store was last used
604
- */
605
- last_active_at?: string | null;
606
- /**
607
- * Total storage usage in bytes
608
- */
609
- usage_bytes?: number;
610
- /**
611
- * Optional expiration timestamp for the vector store
612
- */
613
- expires_at?: string | null;
614
- /**
615
- * Type of the object
616
- */
617
- object?: 'vector_store';
618
- }
619
- export declare namespace VectorStore {
620
- /**
621
- * Counts of files in different states
622
- */
623
- interface FileCounts {
624
- /**
625
- * Number of files waiting to be processed
626
- */
627
- pending?: number;
628
- /**
629
- * Number of files currently being processed
630
- */
631
- in_progress?: number;
632
- /**
633
- * Number of files whose processing was cancelled
634
- */
635
- cancelled?: number;
636
- /**
637
- * Number of successfully processed files
638
- */
639
- completed?: number;
640
- /**
641
- * Number of files that failed processing
642
- */
643
- failed?: number;
644
- /**
645
- * Total number of files
646
- */
647
- total?: number;
648
- }
649
- }
650
- /**
651
- * Options for configuring vector store chunk searches.
652
- */
653
- export interface VectorStoreChunkSearchOptions {
654
- /**
655
- * Minimum similarity score threshold
656
- */
657
- score_threshold?: number;
658
- /**
659
- * Whether to rewrite the query. Ignored when agentic is enabled (the agent handles
660
- * query decomposition).
661
- */
662
- rewrite_query?: boolean;
663
- /**
664
- * Whether to rerank results and optional reranking configuration. Ignored when
665
- * agentic is enabled (the agent handles ranking).
666
- */
667
- rerank?: boolean | FilesAPI.RerankConfig | null;
668
- /**
669
- * Whether to use agentic multi-query search with automatic query decomposition and
670
- * ranking. When enabled, rewrite_query and rerank options are ignored.
671
- */
672
- agentic?: boolean | VectorStoreChunkSearchOptions.AgenticSearchConfig | null;
673
- /**
674
- * Whether to return file metadata
675
- */
676
- return_metadata?: boolean;
677
- /**
678
- * Whether to apply search rules
679
- */
680
- apply_search_rules?: boolean;
681
- }
682
- export declare namespace VectorStoreChunkSearchOptions {
683
- /**
684
- * Configuration for agentic multi-query search.
685
- */
686
- interface AgenticSearchConfig {
687
- /**
688
- * Maximum number of search rounds
689
- */
690
- max_rounds?: number;
691
- /**
692
- * Maximum queries per round
693
- */
694
- queries_per_round?: number;
695
- /**
696
- * Results to fetch per query
697
- */
698
- results_per_query?: number;
699
- }
700
- }
701
- /**
702
- * Response model for vector store deletion.
703
- */
704
- export interface VectorStoreDeleteResponse {
705
- /**
706
- * ID of the deleted vector store
707
- */
708
- id: string;
709
- /**
710
- * Whether the deletion was successful
711
- */
712
- deleted: boolean;
713
- /**
714
- * Type of the deleted object
715
- */
716
- object?: 'vector_store';
717
- }
718
- /**
719
- * Results from a question answering operation.
720
- */
721
- export interface VectorStoreQuestionAnsweringResponse {
722
- /**
723
- * The answer generated by the LLM
724
- */
725
- answer: string;
726
- /**
727
- * Source documents used to generate the answer
728
- */
729
- sources?: Array<VectorStoreQuestionAnsweringResponse.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk | VectorStoreQuestionAnsweringResponse.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk | VectorStoreQuestionAnsweringResponse.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk | VectorStoreQuestionAnsweringResponse.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk>;
730
- }
731
- export declare namespace VectorStoreQuestionAnsweringResponse {
732
- /**
733
- * Scored text chunk for deprecated API.
734
- */
735
- interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk {
736
- /**
737
- * position of the chunk in a file
738
- */
739
- chunk_index: number;
740
- /**
741
- * mime type of the chunk
742
- */
743
- mime_type?: string;
744
- /**
745
- * metadata of the chunk
746
- */
747
- generated_metadata?: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.MarkdownChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.TextChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.PdfChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.CodeChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.AudioChunkGeneratedMetadata | null;
748
- /**
749
- * model used for this chunk
750
- */
751
- model?: string | null;
752
- /**
753
- * score of the chunk
754
- */
755
- score: number;
756
- /**
757
- * file id
758
- */
759
- file_id: string;
760
- /**
761
- * filename
762
- */
763
- filename: string;
764
- /**
765
- * store id
766
- */
767
- vector_store_id: string;
768
- /**
769
- * file metadata
770
- */
771
- metadata?: unknown;
772
- /**
773
- * Input type identifier
774
- */
775
- type?: 'text';
776
- /**
777
- * The offset of the text in the file relative to the start of the file.
778
- */
779
- offset?: number;
780
- /**
781
- * Text content to process
782
- */
783
- text: string;
784
- }
785
- namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk {
786
- interface MarkdownChunkGeneratedMetadata {
787
- type?: 'markdown';
788
- file_type?: 'text/markdown';
789
- language: string;
790
- word_count: number;
791
- file_size: number;
792
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
793
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
794
- start_line?: number;
795
- num_lines?: number;
796
- [k: string]: unknown;
797
- }
798
- namespace MarkdownChunkGeneratedMetadata {
799
- interface ChunkHeading {
800
- level: number;
801
- text: string;
802
- }
803
- interface HeadingContext {
804
- level: number;
805
- text: string;
806
- }
807
- }
808
- interface TextChunkGeneratedMetadata {
809
- type?: 'text';
810
- file_type?: 'text/plain';
811
- language: string;
812
- word_count: number;
813
- file_size: number;
814
- start_line?: number;
815
- num_lines?: number;
816
- [k: string]: unknown;
817
- }
818
- interface PdfChunkGeneratedMetadata {
819
- type?: 'pdf';
820
- file_type?: 'application/pdf';
821
- total_pages: number;
822
- total_size: number;
823
- [k: string]: unknown;
824
- }
825
- interface CodeChunkGeneratedMetadata {
826
- type?: 'code';
827
- file_type: string;
828
- language: string;
829
- word_count: number;
830
- file_size: number;
831
- start_line?: number;
832
- num_lines?: number;
833
- [k: string]: unknown;
834
- }
835
- interface AudioChunkGeneratedMetadata {
836
- type?: 'audio';
837
- file_type: string;
838
- file_size: number;
839
- total_duration_seconds: number;
840
- sample_rate: number;
841
- channels: number;
842
- audio_format: number;
843
- [k: string]: unknown;
844
- }
845
- }
846
- /**
847
- * Scored image chunk for deprecated API.
848
- */
849
- interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk {
850
- /**
851
- * position of the chunk in a file
852
- */
853
- chunk_index: number;
854
- /**
855
- * mime type of the chunk
856
- */
857
- mime_type?: string;
858
- /**
859
- * metadata of the chunk
860
- */
861
- generated_metadata?: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.MarkdownChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.TextChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.PdfChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.CodeChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.AudioChunkGeneratedMetadata | null;
862
- /**
863
- * model used for this chunk
864
- */
865
- model?: string | null;
866
- /**
867
- * score of the chunk
868
- */
869
- score: number;
870
- /**
871
- * file id
872
- */
873
- file_id: string;
874
- /**
875
- * filename
876
- */
877
- filename: string;
878
- /**
879
- * store id
880
- */
881
- vector_store_id: string;
882
- /**
883
- * file metadata
884
- */
885
- metadata?: unknown;
886
- /**
887
- * Input type identifier
888
- */
889
- type?: 'image_url';
890
- /**
891
- * ocr text of the image
892
- */
893
- ocr_text?: string | null;
894
- /**
895
- * summary of the image
896
- */
897
- summary?: string | null;
898
- /**
899
- * The image input specification.
900
- */
901
- image_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.ImageURL;
902
- }
903
- namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk {
904
- interface MarkdownChunkGeneratedMetadata {
905
- type?: 'markdown';
906
- file_type?: 'text/markdown';
907
- language: string;
908
- word_count: number;
909
- file_size: number;
910
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
911
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
912
- start_line?: number;
913
- num_lines?: number;
914
- [k: string]: unknown;
915
- }
916
- namespace MarkdownChunkGeneratedMetadata {
917
- interface ChunkHeading {
918
- level: number;
919
- text: string;
920
- }
921
- interface HeadingContext {
922
- level: number;
923
- text: string;
924
- }
925
- }
926
- interface TextChunkGeneratedMetadata {
927
- type?: 'text';
928
- file_type?: 'text/plain';
929
- language: string;
930
- word_count: number;
931
- file_size: number;
932
- start_line?: number;
933
- num_lines?: number;
934
- [k: string]: unknown;
935
- }
936
- interface PdfChunkGeneratedMetadata {
937
- type?: 'pdf';
938
- file_type?: 'application/pdf';
939
- total_pages: number;
940
- total_size: number;
941
- [k: string]: unknown;
942
- }
943
- interface CodeChunkGeneratedMetadata {
944
- type?: 'code';
945
- file_type: string;
946
- language: string;
947
- word_count: number;
948
- file_size: number;
949
- start_line?: number;
950
- num_lines?: number;
951
- [k: string]: unknown;
952
- }
953
- interface AudioChunkGeneratedMetadata {
954
- type?: 'audio';
955
- file_type: string;
956
- file_size: number;
957
- total_duration_seconds: number;
958
- sample_rate: number;
959
- channels: number;
960
- audio_format: number;
961
- [k: string]: unknown;
962
- }
963
- /**
964
- * The image input specification.
965
- */
966
- interface ImageURL {
967
- /**
968
- * The image URL. Can be either a URL or a Data URI.
969
- */
970
- url: string;
971
- /**
972
- * The image format/mimetype
973
- */
974
- format?: string;
975
- }
976
- }
977
- /**
978
- * Scored audio chunk for deprecated API.
979
- */
980
- interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk {
981
- /**
982
- * position of the chunk in a file
983
- */
984
- chunk_index: number;
985
- /**
986
- * mime type of the chunk
987
- */
988
- mime_type?: string;
989
- /**
990
- * metadata of the chunk
991
- */
992
- generated_metadata?: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.MarkdownChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.TextChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.PdfChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.CodeChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.AudioChunkGeneratedMetadata | null;
993
- /**
994
- * model used for this chunk
995
- */
996
- model?: string | null;
997
- /**
998
- * score of the chunk
999
- */
1000
- score: number;
1001
- /**
1002
- * file id
1003
- */
1004
- file_id: string;
1005
- /**
1006
- * filename
1007
- */
1008
- filename: string;
1009
- /**
1010
- * store id
1011
- */
1012
- vector_store_id: string;
1013
- /**
1014
- * file metadata
1015
- */
1016
- metadata?: unknown;
1017
- /**
1018
- * Input type identifier
1019
- */
1020
- type?: 'audio_url';
1021
- /**
1022
- * speech recognition (sr) text of the audio
1023
- */
1024
- transcription?: string | null;
1025
- /**
1026
- * summary of the audio
1027
- */
1028
- summary?: string | null;
1029
- /**
1030
- * The audio input specification.
1031
- */
1032
- audio_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.AudioURL;
1033
- /**
1034
- * The sampling rate of the audio.
1035
- */
1036
- sampling_rate: number;
1037
- }
1038
- namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk {
1039
- interface MarkdownChunkGeneratedMetadata {
1040
- type?: 'markdown';
1041
- file_type?: 'text/markdown';
1042
- language: string;
1043
- word_count: number;
1044
- file_size: number;
1045
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
1046
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
1047
- start_line?: number;
1048
- num_lines?: number;
1049
- [k: string]: unknown;
1050
- }
1051
- namespace MarkdownChunkGeneratedMetadata {
1052
- interface ChunkHeading {
1053
- level: number;
1054
- text: string;
1055
- }
1056
- interface HeadingContext {
1057
- level: number;
1058
- text: string;
1059
- }
1060
- }
1061
- interface TextChunkGeneratedMetadata {
1062
- type?: 'text';
1063
- file_type?: 'text/plain';
1064
- language: string;
1065
- word_count: number;
1066
- file_size: number;
1067
- start_line?: number;
1068
- num_lines?: number;
1069
- [k: string]: unknown;
1070
- }
1071
- interface PdfChunkGeneratedMetadata {
1072
- type?: 'pdf';
1073
- file_type?: 'application/pdf';
1074
- total_pages: number;
1075
- total_size: number;
1076
- [k: string]: unknown;
1077
- }
1078
- interface CodeChunkGeneratedMetadata {
1079
- type?: 'code';
1080
- file_type: string;
1081
- language: string;
1082
- word_count: number;
1083
- file_size: number;
1084
- start_line?: number;
1085
- num_lines?: number;
1086
- [k: string]: unknown;
1087
- }
1088
- interface AudioChunkGeneratedMetadata {
1089
- type?: 'audio';
1090
- file_type: string;
1091
- file_size: number;
1092
- total_duration_seconds: number;
1093
- sample_rate: number;
1094
- channels: number;
1095
- audio_format: number;
1096
- [k: string]: unknown;
1097
- }
1098
- /**
1099
- * The audio input specification.
1100
- */
1101
- interface AudioURL {
1102
- /**
1103
- * The audio URL. Can be either a URL or a Data URI.
1104
- */
1105
- url: string;
1106
- }
1107
- }
1108
- /**
1109
- * Scored video chunk for deprecated API.
1110
- */
1111
- interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk {
1112
- /**
1113
- * position of the chunk in a file
1114
- */
1115
- chunk_index: number;
1116
- /**
1117
- * mime type of the chunk
1118
- */
1119
- mime_type?: string;
1120
- /**
1121
- * metadata of the chunk
1122
- */
1123
- generated_metadata?: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.MarkdownChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.TextChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.PdfChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.CodeChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.AudioChunkGeneratedMetadata | null;
1124
- /**
1125
- * model used for this chunk
1126
- */
1127
- model?: string | null;
1128
- /**
1129
- * score of the chunk
1130
- */
1131
- score: number;
1132
- /**
1133
- * file id
1134
- */
1135
- file_id: string;
1136
- /**
1137
- * filename
1138
- */
1139
- filename: string;
1140
- /**
1141
- * store id
1142
- */
1143
- vector_store_id: string;
1144
- /**
1145
- * file metadata
1146
- */
1147
- metadata?: unknown;
1148
- /**
1149
- * Input type identifier
1150
- */
1151
- type?: 'video_url';
1152
- /**
1153
- * speech recognition (sr) text of the video
1154
- */
1155
- transcription?: string | null;
1156
- /**
1157
- * summary of the video
1158
- */
1159
- summary?: string | null;
1160
- /**
1161
- * The video input specification.
1162
- */
1163
- video_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.VideoURL;
1164
- }
1165
- namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk {
1166
- interface MarkdownChunkGeneratedMetadata {
1167
- type?: 'markdown';
1168
- file_type?: 'text/markdown';
1169
- language: string;
1170
- word_count: number;
1171
- file_size: number;
1172
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
1173
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
1174
- start_line?: number;
1175
- num_lines?: number;
1176
- [k: string]: unknown;
1177
- }
1178
- namespace MarkdownChunkGeneratedMetadata {
1179
- interface ChunkHeading {
1180
- level: number;
1181
- text: string;
1182
- }
1183
- interface HeadingContext {
1184
- level: number;
1185
- text: string;
1186
- }
1187
- }
1188
- interface TextChunkGeneratedMetadata {
1189
- type?: 'text';
1190
- file_type?: 'text/plain';
1191
- language: string;
1192
- word_count: number;
1193
- file_size: number;
1194
- start_line?: number;
1195
- num_lines?: number;
1196
- [k: string]: unknown;
1197
- }
1198
- interface PdfChunkGeneratedMetadata {
1199
- type?: 'pdf';
1200
- file_type?: 'application/pdf';
1201
- total_pages: number;
1202
- total_size: number;
1203
- [k: string]: unknown;
1204
- }
1205
- interface CodeChunkGeneratedMetadata {
1206
- type?: 'code';
1207
- file_type: string;
1208
- language: string;
1209
- word_count: number;
1210
- file_size: number;
1211
- start_line?: number;
1212
- num_lines?: number;
1213
- [k: string]: unknown;
1214
- }
1215
- interface AudioChunkGeneratedMetadata {
1216
- type?: 'audio';
1217
- file_type: string;
1218
- file_size: number;
1219
- total_duration_seconds: number;
1220
- sample_rate: number;
1221
- channels: number;
1222
- audio_format: number;
1223
- [k: string]: unknown;
1224
- }
1225
- /**
1226
- * The video input specification.
1227
- */
1228
- interface VideoURL {
1229
- /**
1230
- * The video URL. Can be either a URL or a Data URI.
1231
- */
1232
- url: string;
1233
- }
1234
- }
1235
- }
1236
- export interface VectorStoreSearchResponse {
1237
- /**
1238
- * The object type of the response
1239
- */
1240
- object?: 'list';
1241
- /**
1242
- * The list of scored vector store file chunks
1243
- */
1244
- data: Array<VectorStoreSearchResponse.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk | VectorStoreSearchResponse.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk | VectorStoreSearchResponse.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk | VectorStoreSearchResponse.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk>;
1245
- }
1246
- export declare namespace VectorStoreSearchResponse {
1247
- /**
1248
- * Scored text chunk for deprecated API.
1249
- */
1250
- interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk {
1251
- /**
1252
- * position of the chunk in a file
1253
- */
1254
- chunk_index: number;
1255
- /**
1256
- * mime type of the chunk
1257
- */
1258
- mime_type?: string;
1259
- /**
1260
- * metadata of the chunk
1261
- */
1262
- generated_metadata?: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.MarkdownChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.TextChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.PdfChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.CodeChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk.AudioChunkGeneratedMetadata | null;
1263
- /**
1264
- * model used for this chunk
1265
- */
1266
- model?: string | null;
1267
- /**
1268
- * score of the chunk
1269
- */
1270
- score: number;
1271
- /**
1272
- * file id
1273
- */
1274
- file_id: string;
1275
- /**
1276
- * filename
1277
- */
1278
- filename: string;
1279
- /**
1280
- * store id
1281
- */
1282
- vector_store_id: string;
1283
- /**
1284
- * file metadata
1285
- */
1286
- metadata?: unknown;
1287
- /**
1288
- * Input type identifier
1289
- */
1290
- type?: 'text';
1291
- /**
1292
- * The offset of the text in the file relative to the start of the file.
1293
- */
1294
- offset?: number;
1295
- /**
1296
- * Text content to process
1297
- */
1298
- text: string;
1299
- }
1300
- namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk {
1301
- interface MarkdownChunkGeneratedMetadata {
1302
- type?: 'markdown';
1303
- file_type?: 'text/markdown';
1304
- language: string;
1305
- word_count: number;
1306
- file_size: number;
1307
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
1308
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
1309
- start_line?: number;
1310
- num_lines?: number;
1311
- [k: string]: unknown;
1312
- }
1313
- namespace MarkdownChunkGeneratedMetadata {
1314
- interface ChunkHeading {
1315
- level: number;
1316
- text: string;
1317
- }
1318
- interface HeadingContext {
1319
- level: number;
1320
- text: string;
1321
- }
1322
- }
1323
- interface TextChunkGeneratedMetadata {
1324
- type?: 'text';
1325
- file_type?: 'text/plain';
1326
- language: string;
1327
- word_count: number;
1328
- file_size: number;
1329
- start_line?: number;
1330
- num_lines?: number;
1331
- [k: string]: unknown;
1332
- }
1333
- interface PdfChunkGeneratedMetadata {
1334
- type?: 'pdf';
1335
- file_type?: 'application/pdf';
1336
- total_pages: number;
1337
- total_size: number;
1338
- [k: string]: unknown;
1339
- }
1340
- interface CodeChunkGeneratedMetadata {
1341
- type?: 'code';
1342
- file_type: string;
1343
- language: string;
1344
- word_count: number;
1345
- file_size: number;
1346
- start_line?: number;
1347
- num_lines?: number;
1348
- [k: string]: unknown;
1349
- }
1350
- interface AudioChunkGeneratedMetadata {
1351
- type?: 'audio';
1352
- file_type: string;
1353
- file_size: number;
1354
- total_duration_seconds: number;
1355
- sample_rate: number;
1356
- channels: number;
1357
- audio_format: number;
1358
- [k: string]: unknown;
1359
- }
1360
- }
1361
- /**
1362
- * Scored image chunk for deprecated API.
1363
- */
1364
- interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk {
1365
- /**
1366
- * position of the chunk in a file
1367
- */
1368
- chunk_index: number;
1369
- /**
1370
- * mime type of the chunk
1371
- */
1372
- mime_type?: string;
1373
- /**
1374
- * metadata of the chunk
1375
- */
1376
- generated_metadata?: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.MarkdownChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.TextChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.PdfChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.CodeChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.AudioChunkGeneratedMetadata | null;
1377
- /**
1378
- * model used for this chunk
1379
- */
1380
- model?: string | null;
1381
- /**
1382
- * score of the chunk
1383
- */
1384
- score: number;
1385
- /**
1386
- * file id
1387
- */
1388
- file_id: string;
1389
- /**
1390
- * filename
1391
- */
1392
- filename: string;
1393
- /**
1394
- * store id
1395
- */
1396
- vector_store_id: string;
1397
- /**
1398
- * file metadata
1399
- */
1400
- metadata?: unknown;
1401
- /**
1402
- * Input type identifier
1403
- */
1404
- type?: 'image_url';
1405
- /**
1406
- * ocr text of the image
1407
- */
1408
- ocr_text?: string | null;
1409
- /**
1410
- * summary of the image
1411
- */
1412
- summary?: string | null;
1413
- /**
1414
- * The image input specification.
1415
- */
1416
- image_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.ImageURL;
1417
- }
1418
- namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk {
1419
- interface MarkdownChunkGeneratedMetadata {
1420
- type?: 'markdown';
1421
- file_type?: 'text/markdown';
1422
- language: string;
1423
- word_count: number;
1424
- file_size: number;
1425
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
1426
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
1427
- start_line?: number;
1428
- num_lines?: number;
1429
- [k: string]: unknown;
1430
- }
1431
- namespace MarkdownChunkGeneratedMetadata {
1432
- interface ChunkHeading {
1433
- level: number;
1434
- text: string;
1435
- }
1436
- interface HeadingContext {
1437
- level: number;
1438
- text: string;
1439
- }
1440
- }
1441
- interface TextChunkGeneratedMetadata {
1442
- type?: 'text';
1443
- file_type?: 'text/plain';
1444
- language: string;
1445
- word_count: number;
1446
- file_size: number;
1447
- start_line?: number;
1448
- num_lines?: number;
1449
- [k: string]: unknown;
1450
- }
1451
- interface PdfChunkGeneratedMetadata {
1452
- type?: 'pdf';
1453
- file_type?: 'application/pdf';
1454
- total_pages: number;
1455
- total_size: number;
1456
- [k: string]: unknown;
1457
- }
1458
- interface CodeChunkGeneratedMetadata {
1459
- type?: 'code';
1460
- file_type: string;
1461
- language: string;
1462
- word_count: number;
1463
- file_size: number;
1464
- start_line?: number;
1465
- num_lines?: number;
1466
- [k: string]: unknown;
1467
- }
1468
- interface AudioChunkGeneratedMetadata {
1469
- type?: 'audio';
1470
- file_type: string;
1471
- file_size: number;
1472
- total_duration_seconds: number;
1473
- sample_rate: number;
1474
- channels: number;
1475
- audio_format: number;
1476
- [k: string]: unknown;
1477
- }
1478
- /**
1479
- * The image input specification.
1480
- */
1481
- interface ImageURL {
1482
- /**
1483
- * The image URL. Can be either a URL or a Data URI.
1484
- */
1485
- url: string;
1486
- /**
1487
- * The image format/mimetype
1488
- */
1489
- format?: string;
1490
- }
1491
- }
1492
- /**
1493
- * Scored audio chunk for deprecated API.
1494
- */
1495
- interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk {
1496
- /**
1497
- * position of the chunk in a file
1498
- */
1499
- chunk_index: number;
1500
- /**
1501
- * mime type of the chunk
1502
- */
1503
- mime_type?: string;
1504
- /**
1505
- * metadata of the chunk
1506
- */
1507
- generated_metadata?: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.MarkdownChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.TextChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.PdfChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.CodeChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.AudioChunkGeneratedMetadata | null;
1508
- /**
1509
- * model used for this chunk
1510
- */
1511
- model?: string | null;
1512
- /**
1513
- * score of the chunk
1514
- */
1515
- score: number;
1516
- /**
1517
- * file id
1518
- */
1519
- file_id: string;
1520
- /**
1521
- * filename
1522
- */
1523
- filename: string;
1524
- /**
1525
- * store id
1526
- */
1527
- vector_store_id: string;
1528
- /**
1529
- * file metadata
1530
- */
1531
- metadata?: unknown;
1532
- /**
1533
- * Input type identifier
1534
- */
1535
- type?: 'audio_url';
1536
- /**
1537
- * speech recognition (sr) text of the audio
1538
- */
1539
- transcription?: string | null;
1540
- /**
1541
- * summary of the audio
1542
- */
1543
- summary?: string | null;
1544
- /**
1545
- * The audio input specification.
1546
- */
1547
- audio_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.AudioURL;
1548
- /**
1549
- * The sampling rate of the audio.
1550
- */
1551
- sampling_rate: number;
1552
- }
1553
- namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk {
1554
- interface MarkdownChunkGeneratedMetadata {
1555
- type?: 'markdown';
1556
- file_type?: 'text/markdown';
1557
- language: string;
1558
- word_count: number;
1559
- file_size: number;
1560
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
1561
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
1562
- start_line?: number;
1563
- num_lines?: number;
1564
- [k: string]: unknown;
1565
- }
1566
- namespace MarkdownChunkGeneratedMetadata {
1567
- interface ChunkHeading {
1568
- level: number;
1569
- text: string;
1570
- }
1571
- interface HeadingContext {
1572
- level: number;
1573
- text: string;
1574
- }
1575
- }
1576
- interface TextChunkGeneratedMetadata {
1577
- type?: 'text';
1578
- file_type?: 'text/plain';
1579
- language: string;
1580
- word_count: number;
1581
- file_size: number;
1582
- start_line?: number;
1583
- num_lines?: number;
1584
- [k: string]: unknown;
1585
- }
1586
- interface PdfChunkGeneratedMetadata {
1587
- type?: 'pdf';
1588
- file_type?: 'application/pdf';
1589
- total_pages: number;
1590
- total_size: number;
1591
- [k: string]: unknown;
1592
- }
1593
- interface CodeChunkGeneratedMetadata {
1594
- type?: 'code';
1595
- file_type: string;
1596
- language: string;
1597
- word_count: number;
1598
- file_size: number;
1599
- start_line?: number;
1600
- num_lines?: number;
1601
- [k: string]: unknown;
1602
- }
1603
- interface AudioChunkGeneratedMetadata {
1604
- type?: 'audio';
1605
- file_type: string;
1606
- file_size: number;
1607
- total_duration_seconds: number;
1608
- sample_rate: number;
1609
- channels: number;
1610
- audio_format: number;
1611
- [k: string]: unknown;
1612
- }
1613
- /**
1614
- * The audio input specification.
1615
- */
1616
- interface AudioURL {
1617
- /**
1618
- * The audio URL. Can be either a URL or a Data URI.
1619
- */
1620
- url: string;
1621
- }
1622
- }
1623
- /**
1624
- * Scored video chunk for deprecated API.
1625
- */
1626
- interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk {
1627
- /**
1628
- * position of the chunk in a file
1629
- */
1630
- chunk_index: number;
1631
- /**
1632
- * mime type of the chunk
1633
- */
1634
- mime_type?: string;
1635
- /**
1636
- * metadata of the chunk
1637
- */
1638
- generated_metadata?: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.MarkdownChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.TextChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.PdfChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.CodeChunkGeneratedMetadata | MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.AudioChunkGeneratedMetadata | null;
1639
- /**
1640
- * model used for this chunk
1641
- */
1642
- model?: string | null;
1643
- /**
1644
- * score of the chunk
1645
- */
1646
- score: number;
1647
- /**
1648
- * file id
1649
- */
1650
- file_id: string;
1651
- /**
1652
- * filename
1653
- */
1654
- filename: string;
1655
- /**
1656
- * store id
1657
- */
1658
- vector_store_id: string;
1659
- /**
1660
- * file metadata
1661
- */
1662
- metadata?: unknown;
1663
- /**
1664
- * Input type identifier
1665
- */
1666
- type?: 'video_url';
1667
- /**
1668
- * speech recognition (sr) text of the video
1669
- */
1670
- transcription?: string | null;
1671
- /**
1672
- * summary of the video
1673
- */
1674
- summary?: string | null;
1675
- /**
1676
- * The video input specification.
1677
- */
1678
- video_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.VideoURL;
1679
- }
1680
- namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk {
1681
- interface MarkdownChunkGeneratedMetadata {
1682
- type?: 'markdown';
1683
- file_type?: 'text/markdown';
1684
- language: string;
1685
- word_count: number;
1686
- file_size: number;
1687
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
1688
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
1689
- start_line?: number;
1690
- num_lines?: number;
1691
- [k: string]: unknown;
1692
- }
1693
- namespace MarkdownChunkGeneratedMetadata {
1694
- interface ChunkHeading {
1695
- level: number;
1696
- text: string;
1697
- }
1698
- interface HeadingContext {
1699
- level: number;
1700
- text: string;
1701
- }
1702
- }
1703
- interface TextChunkGeneratedMetadata {
1704
- type?: 'text';
1705
- file_type?: 'text/plain';
1706
- language: string;
1707
- word_count: number;
1708
- file_size: number;
1709
- start_line?: number;
1710
- num_lines?: number;
1711
- [k: string]: unknown;
1712
- }
1713
- interface PdfChunkGeneratedMetadata {
1714
- type?: 'pdf';
1715
- file_type?: 'application/pdf';
1716
- total_pages: number;
1717
- total_size: number;
1718
- [k: string]: unknown;
1719
- }
1720
- interface CodeChunkGeneratedMetadata {
1721
- type?: 'code';
1722
- file_type: string;
1723
- language: string;
1724
- word_count: number;
1725
- file_size: number;
1726
- start_line?: number;
1727
- num_lines?: number;
1728
- [k: string]: unknown;
1729
- }
1730
- interface AudioChunkGeneratedMetadata {
1731
- type?: 'audio';
1732
- file_type: string;
1733
- file_size: number;
1734
- total_duration_seconds: number;
1735
- sample_rate: number;
1736
- channels: number;
1737
- audio_format: number;
1738
- [k: string]: unknown;
1739
- }
1740
- /**
1741
- * The video input specification.
1742
- */
1743
- interface VideoURL {
1744
- /**
1745
- * The video URL. Can be either a URL or a Data URI.
1746
- */
1747
- url: string;
1748
- }
1749
- }
1750
- }
1751
- export interface VectorStoreCreateParams {
1752
- /**
1753
- * Name for the new vector store
1754
- */
1755
- name?: string | null;
1756
- /**
1757
- * Description of the vector store
1758
- */
1759
- description?: string | null;
1760
- /**
1761
- * Whether the vector store can be accessed by anyone with valid login credentials
1762
- */
1763
- is_public?: boolean;
1764
- /**
1765
- * Represents an expiration policy for a store.
1766
- */
1767
- expires_after?: ExpiresAfter | null;
1768
- /**
1769
- * Optional metadata key-value pairs
1770
- */
1771
- metadata?: unknown;
1772
- /**
1773
- * Optional list of file IDs
1774
- */
1775
- file_ids?: Array<string> | null;
1776
- }
1777
- export interface VectorStoreUpdateParams {
1778
- /**
1779
- * New name for the store
1780
- */
1781
- name?: string | null;
1782
- /**
1783
- * New description
1784
- */
1785
- description?: string | null;
1786
- /**
1787
- * Whether the vector store can be accessed by anyone with valid login credentials
1788
- */
1789
- is_public?: boolean | null;
1790
- /**
1791
- * Represents an expiration policy for a store.
1792
- */
1793
- expires_after?: ExpiresAfter | null;
1794
- /**
1795
- * Optional metadata key-value pairs
1796
- */
1797
- metadata?: unknown;
1798
- }
1799
- export interface VectorStoreListParams extends CursorParams {
1800
- /**
1801
- * Search query for fuzzy matching over name and description fields
1802
- */
1803
- q?: string | null;
1804
- }
1805
- export interface VectorStoreQuestionAnsweringParams {
1806
- /**
1807
- * Question to answer. If not provided, the question will be extracted from the
1808
- * passed messages.
1809
- */
1810
- query?: string;
1811
- /**
1812
- * IDs or names of vector stores to search
1813
- */
1814
- vector_store_identifiers: Array<string>;
1815
- /**
1816
- * Number of results to return
1817
- */
1818
- top_k?: number;
1819
- /**
1820
- * Optional filter conditions
1821
- */
1822
- filters?: Shared.SearchFilter | Shared.SearchFilterCondition | Array<Shared.SearchFilter | Shared.SearchFilterCondition> | null;
1823
- /**
1824
- * Optional list of file IDs to filter chunks by (inclusion filter)
1825
- */
1826
- file_ids?: Array<unknown> | Array<string> | null;
1827
- /**
1828
- * Search configuration options
1829
- */
1830
- search_options?: VectorStoreChunkSearchOptions;
1831
- /**
1832
- * Whether to stream the answer
1833
- */
1834
- stream?: boolean;
1835
- /**
1836
- * Question answering configuration options
1837
- */
1838
- qa_options?: VectorStoreQuestionAnsweringParams.QaOptions;
1839
- }
1840
- export declare namespace VectorStoreQuestionAnsweringParams {
1841
- /**
1842
- * Question answering configuration options
1843
- */
1844
- interface QaOptions {
1845
- /**
1846
- * Whether to use citations
1847
- */
1848
- cite?: boolean;
1849
- /**
1850
- * Whether to use multimodal context
1851
- */
1852
- multimodal?: boolean;
1853
- }
1854
- }
1855
- export interface VectorStoreSearchParams {
1856
- /**
1857
- * Search query text
1858
- */
1859
- query: string;
1860
- /**
1861
- * IDs or names of vector stores to search
1862
- */
1863
- vector_store_identifiers: Array<string>;
1864
- /**
1865
- * Number of results to return
1866
- */
1867
- top_k?: number;
1868
- /**
1869
- * Optional filter conditions
1870
- */
1871
- filters?: Shared.SearchFilter | Shared.SearchFilterCondition | Array<Shared.SearchFilter | Shared.SearchFilterCondition> | null;
1872
- /**
1873
- * Optional list of file IDs to filter chunks by (inclusion filter)
1874
- */
1875
- file_ids?: Array<unknown> | Array<string> | null;
1876
- /**
1877
- * Search configuration options
1878
- */
1879
- search_options?: VectorStoreChunkSearchOptions;
1880
- }
1881
- export declare namespace VectorStores {
1882
- export { type ExpiresAfter as ExpiresAfter, type ScoredAudioURLInputChunk as ScoredAudioURLInputChunk, type ScoredImageURLInputChunk as ScoredImageURLInputChunk, type ScoredTextInputChunk as ScoredTextInputChunk, type ScoredVideoURLInputChunk as ScoredVideoURLInputChunk, type VectorStore as VectorStore, type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions, type VectorStoreDeleteResponse as VectorStoreDeleteResponse, type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse, type VectorStoreSearchResponse as VectorStoreSearchResponse, type VectorStoresCursor as VectorStoresCursor, type VectorStoreCreateParams as VectorStoreCreateParams, type VectorStoreUpdateParams as VectorStoreUpdateParams, type VectorStoreListParams as VectorStoreListParams, type VectorStoreQuestionAnsweringParams as VectorStoreQuestionAnsweringParams, type VectorStoreSearchParams as VectorStoreSearchParams, };
1883
- export { Files as Files, type RerankConfig as RerankConfig, type ScoredVectorStoreFile as ScoredVectorStoreFile, type VectorStoreFileStatus as VectorStoreFileStatus, type VectorStoreFile as VectorStoreFile, type FileListResponse as FileListResponse, type FileDeleteResponse as FileDeleteResponse, type FileSearchResponse as FileSearchResponse, type FileCreateParams as FileCreateParams, type FileRetrieveParams as FileRetrieveParams, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileSearchParams as FileSearchParams, };
1884
- }
1885
- //# sourceMappingURL=vector-stores.d.ts.map