@mixedbread/sdk 0.5.0 → 0.6.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 (171) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/bin/migration-config.json +103 -0
  3. package/client.d.mts +15 -28
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +15 -28
  6. package/client.d.ts.map +1 -1
  7. package/client.js +9 -22
  8. package/client.js.map +1 -1
  9. package/client.mjs +9 -22
  10. package/client.mjs.map +1 -1
  11. package/internal/headers.js +1 -1
  12. package/internal/headers.js.map +1 -1
  13. package/internal/headers.mjs +1 -1
  14. package/internal/headers.mjs.map +1 -1
  15. package/package.json +1 -4
  16. package/resources/api-keys.d.mts +171 -0
  17. package/resources/api-keys.d.mts.map +1 -0
  18. package/resources/api-keys.d.ts +171 -0
  19. package/resources/api-keys.d.ts.map +1 -0
  20. package/resources/api-keys.js +76 -0
  21. package/resources/api-keys.js.map +1 -0
  22. package/resources/api-keys.mjs +72 -0
  23. package/resources/api-keys.mjs.map +1 -0
  24. package/resources/chat.d.mts +27 -0
  25. package/resources/chat.d.mts.map +1 -0
  26. package/resources/chat.d.ts +27 -0
  27. package/resources/chat.d.ts.map +1 -0
  28. package/resources/chat.js +28 -0
  29. package/resources/chat.js.map +1 -0
  30. package/resources/chat.mjs +24 -0
  31. package/resources/chat.mjs.map +1 -0
  32. package/resources/data-sources/connectors.d.mts +193 -0
  33. package/resources/data-sources/connectors.d.mts.map +1 -0
  34. package/resources/data-sources/connectors.d.ts +193 -0
  35. package/resources/data-sources/connectors.d.ts.map +1 -0
  36. package/resources/data-sources/connectors.js +73 -0
  37. package/resources/data-sources/connectors.js.map +1 -0
  38. package/resources/data-sources/connectors.mjs +69 -0
  39. package/resources/data-sources/connectors.mjs.map +1 -0
  40. package/resources/data-sources/data-sources.d.mts +183 -0
  41. package/resources/data-sources/data-sources.d.mts.map +1 -0
  42. package/resources/data-sources/data-sources.d.ts +183 -0
  43. package/resources/data-sources/data-sources.d.ts.map +1 -0
  44. package/resources/data-sources/data-sources.js +66 -0
  45. package/resources/data-sources/data-sources.js.map +1 -0
  46. package/resources/data-sources/data-sources.mjs +61 -0
  47. package/resources/data-sources/data-sources.mjs.map +1 -0
  48. package/resources/data-sources/index.d.mts +3 -0
  49. package/resources/data-sources/index.d.mts.map +1 -0
  50. package/resources/data-sources/index.d.ts +3 -0
  51. package/resources/data-sources/index.d.ts.map +1 -0
  52. package/resources/data-sources/index.js +9 -0
  53. package/resources/data-sources/index.js.map +1 -0
  54. package/resources/data-sources/index.mjs +4 -0
  55. package/resources/data-sources/index.mjs.map +1 -0
  56. package/resources/data-sources.d.mts +2 -0
  57. package/resources/data-sources.d.mts.map +1 -0
  58. package/resources/data-sources.d.ts +2 -0
  59. package/resources/data-sources.d.ts.map +1 -0
  60. package/resources/data-sources.js +6 -0
  61. package/resources/data-sources.js.map +1 -0
  62. package/resources/data-sources.mjs +3 -0
  63. package/resources/data-sources.mjs.map +1 -0
  64. package/resources/embeddings.d.mts +7 -11
  65. package/resources/embeddings.d.mts.map +1 -1
  66. package/resources/embeddings.d.ts +7 -11
  67. package/resources/embeddings.d.ts.map +1 -1
  68. package/resources/embeddings.js +0 -9
  69. package/resources/embeddings.js.map +1 -1
  70. package/resources/embeddings.mjs +0 -9
  71. package/resources/embeddings.mjs.map +1 -1
  72. package/resources/extractions/content.d.mts +42 -44
  73. package/resources/extractions/content.d.mts.map +1 -1
  74. package/resources/extractions/content.d.ts +42 -44
  75. package/resources/extractions/content.d.ts.map +1 -1
  76. package/resources/extractions/extractions.d.mts +2 -2
  77. package/resources/extractions/extractions.d.mts.map +1 -1
  78. package/resources/extractions/extractions.d.ts +2 -2
  79. package/resources/extractions/extractions.d.ts.map +1 -1
  80. package/resources/extractions/extractions.js.map +1 -1
  81. package/resources/extractions/extractions.mjs.map +1 -1
  82. package/resources/extractions/index.d.mts +1 -1
  83. package/resources/extractions/index.d.mts.map +1 -1
  84. package/resources/extractions/index.d.ts +1 -1
  85. package/resources/extractions/index.d.ts.map +1 -1
  86. package/resources/extractions/index.js.map +1 -1
  87. package/resources/extractions/index.mjs +1 -1
  88. package/resources/extractions/index.mjs.map +1 -1
  89. package/resources/extractions/jobs.d.mts +2 -1
  90. package/resources/extractions/jobs.d.mts.map +1 -1
  91. package/resources/extractions/jobs.d.ts +2 -1
  92. package/resources/extractions/jobs.d.ts.map +1 -1
  93. package/resources/extractions/jobs.js.map +1 -1
  94. package/resources/extractions/jobs.mjs.map +1 -1
  95. package/resources/files.d.mts +18 -1
  96. package/resources/files.d.mts.map +1 -1
  97. package/resources/files.d.ts +18 -1
  98. package/resources/files.d.ts.map +1 -1
  99. package/resources/index.d.mts +6 -3
  100. package/resources/index.d.mts.map +1 -1
  101. package/resources/index.d.ts +6 -3
  102. package/resources/index.d.ts.map +1 -1
  103. package/resources/index.js +7 -1
  104. package/resources/index.js.map +1 -1
  105. package/resources/index.mjs +3 -0
  106. package/resources/index.mjs.map +1 -1
  107. package/resources/parsing/index.d.mts +1 -1
  108. package/resources/parsing/index.d.mts.map +1 -1
  109. package/resources/parsing/index.d.ts +1 -1
  110. package/resources/parsing/index.d.ts.map +1 -1
  111. package/resources/parsing/index.js.map +1 -1
  112. package/resources/parsing/index.mjs.map +1 -1
  113. package/resources/parsing/jobs.d.mts +24 -10
  114. package/resources/parsing/jobs.d.mts.map +1 -1
  115. package/resources/parsing/jobs.d.ts +24 -10
  116. package/resources/parsing/jobs.d.ts.map +1 -1
  117. package/resources/parsing/jobs.js.map +1 -1
  118. package/resources/parsing/jobs.mjs.map +1 -1
  119. package/resources/parsing/parsing.d.mts +2 -2
  120. package/resources/parsing/parsing.d.mts.map +1 -1
  121. package/resources/parsing/parsing.d.ts +2 -2
  122. package/resources/parsing/parsing.d.ts.map +1 -1
  123. package/resources/parsing/parsing.js.map +1 -1
  124. package/resources/parsing/parsing.mjs.map +1 -1
  125. package/resources/top-level.d.mts +5 -4
  126. package/resources/top-level.d.mts.map +1 -1
  127. package/resources/top-level.d.ts +5 -4
  128. package/resources/top-level.d.ts.map +1 -1
  129. package/resources/vector-stores/files.d.mts +29 -2
  130. package/resources/vector-stores/files.d.mts.map +1 -1
  131. package/resources/vector-stores/files.d.ts +29 -2
  132. package/resources/vector-stores/files.d.ts.map +1 -1
  133. package/resources/vector-stores/index.d.mts +1 -1
  134. package/resources/vector-stores/index.d.mts.map +1 -1
  135. package/resources/vector-stores/index.d.ts +1 -1
  136. package/resources/vector-stores/index.d.ts.map +1 -1
  137. package/resources/vector-stores/index.js.map +1 -1
  138. package/resources/vector-stores/index.mjs.map +1 -1
  139. package/resources/vector-stores/vector-stores.d.mts +209 -79
  140. package/resources/vector-stores/vector-stores.d.mts.map +1 -1
  141. package/resources/vector-stores/vector-stores.d.ts +209 -79
  142. package/resources/vector-stores/vector-stores.d.ts.map +1 -1
  143. package/resources/vector-stores/vector-stores.js.map +1 -1
  144. package/resources/vector-stores/vector-stores.mjs.map +1 -1
  145. package/src/client.ts +68 -30
  146. package/src/internal/headers.ts +1 -1
  147. package/src/resources/api-keys.ts +225 -0
  148. package/src/resources/chat.ts +33 -0
  149. package/src/resources/data-sources/connectors.ts +280 -0
  150. package/src/resources/data-sources/data-sources.ts +271 -0
  151. package/src/resources/data-sources/index.ts +24 -0
  152. package/src/resources/data-sources.ts +3 -0
  153. package/src/resources/embeddings.ts +25 -19
  154. package/src/resources/extractions/content.ts +48 -45
  155. package/src/resources/extractions/extractions.ts +3 -1
  156. package/src/resources/extractions/index.ts +7 -1
  157. package/src/resources/extractions/jobs.ts +2 -1
  158. package/src/resources/files.ts +21 -0
  159. package/src/resources/index.ts +27 -4
  160. package/src/resources/parsing/index.ts +4 -0
  161. package/src/resources/parsing/jobs.ts +42 -44
  162. package/src/resources/parsing/parsing.ts +8 -0
  163. package/src/resources/top-level.ts +5 -44
  164. package/src/resources/vector-stores/files.ts +39 -2
  165. package/src/resources/vector-stores/index.ts +4 -3
  166. package/src/resources/vector-stores/vector-stores.ts +251 -89
  167. package/src/version.ts +1 -1
  168. package/version.d.mts +1 -1
  169. package/version.d.ts +1 -1
  170. package/version.js +1 -1
  171. package/version.mjs +1 -1
@@ -138,56 +138,95 @@ export interface ExpiresAfter {
138
138
  days?: number;
139
139
  }
140
140
 
141
- /**
142
- * Tracks counts of files in different states within a vector store.
143
- */
144
- export interface FileCounts {
141
+ export interface ScoredAudioURLInputChunk {
142
+ /**
143
+ * position of the chunk in a file
144
+ */
145
+ chunk_index: number;
146
+
147
+ /**
148
+ * mime type of the chunk
149
+ */
150
+ mime_type?: string;
151
+
152
+ /**
153
+ * model used for this chunk
154
+ */
155
+ model?: string | null;
156
+
157
+ /**
158
+ * score of the chunk
159
+ */
160
+ score: number;
161
+
162
+ /**
163
+ * file id
164
+ */
165
+ file_id: string;
166
+
167
+ /**
168
+ * filename
169
+ */
170
+ filename: string;
171
+
172
+ /**
173
+ * vector store id
174
+ */
175
+ vector_store_id: string;
176
+
177
+ /**
178
+ * file metadata
179
+ */
180
+ metadata?: unknown;
181
+
145
182
  /**
146
- * Number of files currently being processed
183
+ * Input type identifier
147
184
  */
148
- in_progress?: number;
185
+ type?: 'audio_url';
149
186
 
150
187
  /**
151
- * Number of files whose processing was cancelled
188
+ * The audio input specification.
152
189
  */
153
- cancelled?: number;
190
+ audio_url: ScoredAudioURLInputChunk.AudioURL;
154
191
 
155
192
  /**
156
- * Number of successfully processed files
193
+ * speech recognition (sr) text of the audio
157
194
  */
158
- completed?: number;
195
+ transcription?: string | null;
159
196
 
160
197
  /**
161
- * Number of files that failed processing
198
+ * summary of the audio
162
199
  */
163
- failed?: number;
200
+ summary?: string | null;
201
+ }
164
202
 
203
+ export namespace ScoredAudioURLInputChunk {
165
204
  /**
166
- * Total number of files
205
+ * The audio input specification.
167
206
  */
168
- total?: number;
207
+ export interface AudioURL {
208
+ /**
209
+ * The audio URL. Can be either a URL or a Data URI.
210
+ */
211
+ url: string;
212
+ }
169
213
  }
170
214
 
171
- export interface ScoredVectorStoreChunk {
215
+ export interface ScoredImageURLInputChunk {
172
216
  /**
173
217
  * position of the chunk in a file
174
218
  */
175
- position: number;
219
+ chunk_index: number;
176
220
 
177
221
  /**
178
- * value of the chunk
222
+ * mime type of the chunk
179
223
  */
180
- value?:
181
- | string
182
- | ScoredVectorStoreChunk.ImageURLInput
183
- | ScoredVectorStoreChunk.TextInput
184
- | Record<string, unknown>
185
- | null;
224
+ mime_type?: string;
186
225
 
187
226
  /**
188
- * content of the chunk
227
+ * model used for this chunk
189
228
  */
190
- content?: string | null;
229
+ model?: string | null;
191
230
 
192
231
  /**
193
232
  * score of the chunk
@@ -213,52 +252,163 @@ export interface ScoredVectorStoreChunk {
213
252
  * file metadata
214
253
  */
215
254
  metadata?: unknown;
216
- }
217
255
 
218
- export namespace ScoredVectorStoreChunk {
219
256
  /**
220
- * Model for image input validation.
257
+ * Input type identifier
221
258
  */
222
- export interface ImageURLInput {
223
- /**
224
- * Input type identifier
225
- */
226
- type?: 'image_url';
259
+ type?: 'image_url';
227
260
 
228
- /**
229
- * The image input specification.
230
- */
231
- image_url: ImageURLInput.ImageURL;
232
- }
261
+ /**
262
+ * The image input specification.
263
+ */
264
+ image_url: ScoredImageURLInputChunk.ImageURL;
265
+
266
+ /**
267
+ * ocr text of the image
268
+ */
269
+ ocr_text?: string | null;
270
+
271
+ /**
272
+ * summary of the image
273
+ */
274
+ summary?: string | null;
275
+ }
233
276
 
234
- export namespace ImageURLInput {
277
+ export namespace ScoredImageURLInputChunk {
278
+ /**
279
+ * The image input specification.
280
+ */
281
+ export interface ImageURL {
235
282
  /**
236
- * The image input specification.
283
+ * The image URL. Can be either a URL or a Data URI.
237
284
  */
238
- export interface ImageURL {
239
- /**
240
- * The image URL. Can be either a URL or a Data URI.
241
- */
242
- url: string;
243
- }
285
+ url: string;
244
286
  }
287
+ }
245
288
 
289
+ export interface ScoredTextInputChunk {
246
290
  /**
247
- * Model for text input validation.
248
- *
249
- * Attributes: type: Input type identifier, always "text" text: The actual text
250
- * content, with length and whitespace constraints
291
+ * position of the chunk in a file
251
292
  */
252
- export interface TextInput {
253
- /**
254
- * Input type identifier
255
- */
256
- type?: 'text';
293
+ chunk_index: number;
294
+
295
+ /**
296
+ * mime type of the chunk
297
+ */
298
+ mime_type?: string;
299
+
300
+ /**
301
+ * model used for this chunk
302
+ */
303
+ model?: string | null;
304
+
305
+ /**
306
+ * score of the chunk
307
+ */
308
+ score: number;
309
+
310
+ /**
311
+ * file id
312
+ */
313
+ file_id: string;
314
+
315
+ /**
316
+ * filename
317
+ */
318
+ filename: string;
319
+
320
+ /**
321
+ * vector store id
322
+ */
323
+ vector_store_id: string;
257
324
 
325
+ /**
326
+ * file metadata
327
+ */
328
+ metadata?: unknown;
329
+
330
+ /**
331
+ * Input type identifier
332
+ */
333
+ type?: 'text';
334
+
335
+ /**
336
+ * Text content to process
337
+ */
338
+ text: string;
339
+ }
340
+
341
+ export interface ScoredVideoURLInputChunk {
342
+ /**
343
+ * position of the chunk in a file
344
+ */
345
+ chunk_index: number;
346
+
347
+ /**
348
+ * mime type of the chunk
349
+ */
350
+ mime_type?: string;
351
+
352
+ /**
353
+ * model used for this chunk
354
+ */
355
+ model?: string | null;
356
+
357
+ /**
358
+ * score of the chunk
359
+ */
360
+ score: number;
361
+
362
+ /**
363
+ * file id
364
+ */
365
+ file_id: string;
366
+
367
+ /**
368
+ * filename
369
+ */
370
+ filename: string;
371
+
372
+ /**
373
+ * vector store id
374
+ */
375
+ vector_store_id: string;
376
+
377
+ /**
378
+ * file metadata
379
+ */
380
+ metadata?: unknown;
381
+
382
+ /**
383
+ * Input type identifier
384
+ */
385
+ type?: 'video_url';
386
+
387
+ /**
388
+ * The video input specification.
389
+ */
390
+ video_url: ScoredVideoURLInputChunk.VideoURL;
391
+
392
+ /**
393
+ * speech recognition (sr) text of the video
394
+ */
395
+ transcription?: string | null;
396
+
397
+ /**
398
+ * summary of the video
399
+ */
400
+ summary?: string | null;
401
+ }
402
+
403
+ export namespace ScoredVideoURLInputChunk {
404
+ /**
405
+ * The video input specification.
406
+ */
407
+ export interface VideoURL {
258
408
  /**
259
- * Text content to process
409
+ * The video URL. Can be either a URL or a Data URI.
260
410
  */
261
- text: string;
411
+ url: string;
262
412
  }
263
413
  }
264
414
 
@@ -289,7 +439,7 @@ export interface VectorStore {
289
439
  /**
290
440
  * Counts of files in different states
291
441
  */
292
- file_counts?: FileCounts;
442
+ file_counts?: VectorStore.FileCounts;
293
443
 
294
444
  /**
295
445
  * Represents an expiration policy for a vector store.
@@ -332,30 +482,42 @@ export interface VectorStore {
332
482
  object?: 'vector_store';
333
483
  }
334
484
 
335
- /**
336
- * Options for configuring vector store chunk searches.
337
- */
338
- export interface VectorStoreChunkSearchOptions {
485
+ export namespace VectorStore {
339
486
  /**
340
- * Minimum similarity score threshold
487
+ * Counts of files in different states
341
488
  */
342
- score_threshold?: number;
489
+ export interface FileCounts {
490
+ /**
491
+ * Number of files currently being processed
492
+ */
493
+ in_progress?: number;
343
494
 
344
- /**
345
- * Whether to rewrite the query
346
- */
347
- rewrite_query?: boolean;
495
+ /**
496
+ * Number of files whose processing was cancelled
497
+ */
498
+ cancelled?: number;
348
499
 
349
- /**
350
- * Whether to return file metadata
351
- */
352
- return_metadata?: boolean;
500
+ /**
501
+ * Number of successfully processed files
502
+ */
503
+ completed?: number;
504
+
505
+ /**
506
+ * Number of files that failed processing
507
+ */
508
+ failed?: number;
509
+
510
+ /**
511
+ * Total number of files
512
+ */
513
+ total?: number;
514
+ }
353
515
  }
354
516
 
355
517
  /**
356
- * Options for configuring vector store file searches.
518
+ * Options for configuring vector store chunk searches.
357
519
  */
358
- export interface VectorStoreFileSearchOptions {
520
+ export interface VectorStoreChunkSearchOptions {
359
521
  /**
360
522
  * Minimum similarity score threshold
361
523
  */
@@ -370,16 +532,6 @@ export interface VectorStoreFileSearchOptions {
370
532
  * Whether to return file metadata
371
533
  */
372
534
  return_metadata?: boolean;
373
-
374
- /**
375
- * Whether to return matching text chunks
376
- */
377
- return_chunks?: boolean;
378
-
379
- /**
380
- * Number of chunks to return for each file
381
- */
382
- chunks_per_file?: number;
383
535
  }
384
536
 
385
537
  /**
@@ -414,7 +566,9 @@ export interface VectorStoreQuestionAnsweringResponse {
414
566
  /**
415
567
  * Source documents used to generate the answer
416
568
  */
417
- sources?: Array<ScoredVectorStoreChunk>;
569
+ sources?: Array<
570
+ ScoredTextInputChunk | ScoredImageURLInputChunk | ScoredAudioURLInputChunk | ScoredVideoURLInputChunk
571
+ >;
418
572
  }
419
573
 
420
574
  export interface VectorStoreSearchResponse {
@@ -426,7 +580,9 @@ export interface VectorStoreSearchResponse {
426
580
  /**
427
581
  * The list of scored vector store file chunks
428
582
  */
429
- data: Array<ScoredVectorStoreChunk>;
583
+ data: Array<
584
+ ScoredTextInputChunk | ScoredImageURLInputChunk | ScoredAudioURLInputChunk | ScoredVideoURLInputChunk
585
+ >;
430
586
  }
431
587
 
432
588
  export interface VectorStoreCreateParams {
@@ -531,6 +687,11 @@ export namespace VectorStoreQuestionAnsweringParams {
531
687
  * Whether to use citations
532
688
  */
533
689
  cite?: boolean;
690
+
691
+ /**
692
+ * Whether to use multimodal context
693
+ */
694
+ multimodal?: boolean;
534
695
  }
535
696
  }
536
697
 
@@ -570,11 +731,12 @@ VectorStores.Files = Files;
570
731
  export declare namespace VectorStores {
571
732
  export {
572
733
  type ExpiresAfter as ExpiresAfter,
573
- type FileCounts as FileCounts,
574
- type ScoredVectorStoreChunk as ScoredVectorStoreChunk,
734
+ type ScoredAudioURLInputChunk as ScoredAudioURLInputChunk,
735
+ type ScoredImageURLInputChunk as ScoredImageURLInputChunk,
736
+ type ScoredTextInputChunk as ScoredTextInputChunk,
737
+ type ScoredVideoURLInputChunk as ScoredVideoURLInputChunk,
575
738
  type VectorStore as VectorStore,
576
739
  type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions,
577
- type VectorStoreFileSearchOptions as VectorStoreFileSearchOptions,
578
740
  type VectorStoreDeleteResponse as VectorStoreDeleteResponse,
579
741
  type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse,
580
742
  type VectorStoreSearchResponse as VectorStoreSearchResponse,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.5.0'; // x-release-please-version
1
+ export const VERSION = '0.6.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.5.0";
1
+ export declare const VERSION = "0.6.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.5.0";
1
+ export declare const VERSION = "0.6.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.5.0'; // x-release-please-version
4
+ exports.VERSION = '0.6.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.5.0'; // x-release-please-version
1
+ export const VERSION = '0.6.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map