@mixedbread/sdk 0.5.0 → 0.7.2

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 (228) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +12 -24
  3. package/bin/migration-config.json +105 -2
  4. package/client.d.mts +12 -28
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +12 -28
  7. package/client.d.ts.map +1 -1
  8. package/client.js +6 -22
  9. package/client.js.map +1 -1
  10. package/client.mjs +6 -22
  11. package/client.mjs.map +1 -1
  12. package/core/pagination.d.mts +1 -1
  13. package/core/pagination.d.mts.map +1 -1
  14. package/core/pagination.d.ts +1 -1
  15. package/core/pagination.d.ts.map +1 -1
  16. package/core/resource.d.mts +1 -1
  17. package/core/resource.d.mts.map +1 -1
  18. package/core/resource.d.ts +1 -1
  19. package/core/resource.d.ts.map +1 -1
  20. package/core/resource.js.map +1 -1
  21. package/core/resource.mjs.map +1 -1
  22. package/internal/detect-platform.js +3 -3
  23. package/internal/detect-platform.js.map +1 -1
  24. package/internal/detect-platform.mjs +3 -3
  25. package/internal/detect-platform.mjs.map +1 -1
  26. package/internal/headers.d.mts.map +1 -1
  27. package/internal/headers.d.ts.map +1 -1
  28. package/internal/headers.js +5 -5
  29. package/internal/headers.js.map +1 -1
  30. package/internal/headers.mjs +5 -5
  31. package/internal/headers.mjs.map +1 -1
  32. package/internal/shim-types.d.mts +11 -22
  33. package/internal/shim-types.d.mts.map +1 -0
  34. package/internal/shim-types.d.ts +11 -22
  35. package/internal/shim-types.d.ts.map +1 -0
  36. package/internal/shim-types.js +4 -0
  37. package/internal/shim-types.js.map +1 -0
  38. package/internal/shim-types.mjs +3 -0
  39. package/internal/shim-types.mjs.map +1 -0
  40. package/internal/shims.d.mts +2 -2
  41. package/internal/shims.d.mts.map +1 -1
  42. package/internal/shims.d.ts +2 -2
  43. package/internal/shims.d.ts.map +1 -1
  44. package/internal/uploads.js +1 -1
  45. package/internal/uploads.js.map +1 -1
  46. package/internal/uploads.mjs +1 -1
  47. package/internal/uploads.mjs.map +1 -1
  48. package/internal/utils/log.js +1 -1
  49. package/internal/utils/log.js.map +1 -1
  50. package/internal/utils/log.mjs +1 -1
  51. package/internal/utils/log.mjs.map +1 -1
  52. package/internal/utils/path.d.mts.map +1 -1
  53. package/internal/utils/path.d.ts.map +1 -1
  54. package/internal/utils/path.js.map +1 -1
  55. package/internal/utils/path.mjs +1 -1
  56. package/internal/utils/path.mjs.map +1 -1
  57. package/internal/utils/values.d.mts +2 -0
  58. package/internal/utils/values.d.mts.map +1 -1
  59. package/internal/utils/values.d.ts +2 -0
  60. package/internal/utils/values.d.ts.map +1 -1
  61. package/internal/utils/values.js +4 -1
  62. package/internal/utils/values.js.map +1 -1
  63. package/internal/utils/values.mjs +2 -0
  64. package/internal/utils/values.mjs.map +1 -1
  65. package/package.json +1 -7
  66. package/resources/api-keys.d.mts +171 -0
  67. package/resources/api-keys.d.mts.map +1 -0
  68. package/resources/api-keys.d.ts +171 -0
  69. package/resources/api-keys.d.ts.map +1 -0
  70. package/resources/api-keys.js +76 -0
  71. package/resources/api-keys.js.map +1 -0
  72. package/resources/api-keys.mjs +72 -0
  73. package/resources/api-keys.mjs.map +1 -0
  74. package/resources/data-sources/connectors.d.mts +203 -0
  75. package/resources/data-sources/connectors.d.mts.map +1 -0
  76. package/resources/data-sources/connectors.d.ts +203 -0
  77. package/resources/data-sources/connectors.d.ts.map +1 -0
  78. package/resources/data-sources/connectors.js +73 -0
  79. package/resources/data-sources/connectors.js.map +1 -0
  80. package/resources/data-sources/connectors.mjs +69 -0
  81. package/resources/data-sources/connectors.mjs.map +1 -0
  82. package/resources/data-sources/data-sources.d.mts +287 -0
  83. package/resources/data-sources/data-sources.d.mts.map +1 -0
  84. package/resources/data-sources/data-sources.d.ts +287 -0
  85. package/resources/data-sources/data-sources.d.ts.map +1 -0
  86. package/resources/data-sources/data-sources.js +66 -0
  87. package/resources/data-sources/data-sources.js.map +1 -0
  88. package/resources/data-sources/data-sources.mjs +61 -0
  89. package/resources/data-sources/data-sources.mjs.map +1 -0
  90. package/resources/data-sources/index.d.mts +3 -0
  91. package/resources/data-sources/index.d.mts.map +1 -0
  92. package/resources/data-sources/index.d.ts +3 -0
  93. package/resources/data-sources/index.d.ts.map +1 -0
  94. package/resources/data-sources/index.js +9 -0
  95. package/resources/data-sources/index.js.map +1 -0
  96. package/resources/data-sources/index.mjs +4 -0
  97. package/resources/data-sources/index.mjs.map +1 -0
  98. package/resources/data-sources.d.mts +2 -0
  99. package/resources/data-sources.d.mts.map +1 -0
  100. package/resources/data-sources.d.ts +2 -0
  101. package/resources/data-sources.d.ts.map +1 -0
  102. package/resources/data-sources.js +6 -0
  103. package/resources/data-sources.js.map +1 -0
  104. package/resources/data-sources.mjs +3 -0
  105. package/resources/data-sources.mjs.map +1 -0
  106. package/resources/embeddings.d.mts +7 -11
  107. package/resources/embeddings.d.mts.map +1 -1
  108. package/resources/embeddings.d.ts +7 -11
  109. package/resources/embeddings.d.ts.map +1 -1
  110. package/resources/embeddings.js +0 -9
  111. package/resources/embeddings.js.map +1 -1
  112. package/resources/embeddings.mjs +0 -9
  113. package/resources/embeddings.mjs.map +1 -1
  114. package/resources/extractions/content.d.mts +44 -42
  115. package/resources/extractions/content.d.mts.map +1 -1
  116. package/resources/extractions/content.d.ts +44 -42
  117. package/resources/extractions/content.d.ts.map +1 -1
  118. package/resources/extractions/extractions.d.mts +2 -2
  119. package/resources/extractions/extractions.d.mts.map +1 -1
  120. package/resources/extractions/extractions.d.ts +2 -2
  121. package/resources/extractions/extractions.d.ts.map +1 -1
  122. package/resources/extractions/extractions.js.map +1 -1
  123. package/resources/extractions/extractions.mjs.map +1 -1
  124. package/resources/extractions/index.d.mts +1 -1
  125. package/resources/extractions/index.d.mts.map +1 -1
  126. package/resources/extractions/index.d.ts +1 -1
  127. package/resources/extractions/index.d.ts.map +1 -1
  128. package/resources/extractions/index.js.map +1 -1
  129. package/resources/extractions/index.mjs +1 -1
  130. package/resources/extractions/index.mjs.map +1 -1
  131. package/resources/extractions/jobs.d.mts +2 -1
  132. package/resources/extractions/jobs.d.mts.map +1 -1
  133. package/resources/extractions/jobs.d.ts +2 -1
  134. package/resources/extractions/jobs.d.ts.map +1 -1
  135. package/resources/extractions/jobs.js.map +1 -1
  136. package/resources/extractions/jobs.mjs.map +1 -1
  137. package/resources/files.d.mts +18 -1
  138. package/resources/files.d.mts.map +1 -1
  139. package/resources/files.d.ts +18 -1
  140. package/resources/files.d.ts.map +1 -1
  141. package/resources/index.d.mts +5 -3
  142. package/resources/index.d.mts.map +1 -1
  143. package/resources/index.d.ts +5 -3
  144. package/resources/index.d.ts.map +1 -1
  145. package/resources/index.js +5 -1
  146. package/resources/index.js.map +1 -1
  147. package/resources/index.mjs +2 -0
  148. package/resources/index.mjs.map +1 -1
  149. package/resources/parsing/index.d.mts +1 -1
  150. package/resources/parsing/index.d.mts.map +1 -1
  151. package/resources/parsing/index.d.ts +1 -1
  152. package/resources/parsing/index.d.ts.map +1 -1
  153. package/resources/parsing/index.js.map +1 -1
  154. package/resources/parsing/index.mjs.map +1 -1
  155. package/resources/parsing/jobs.d.mts +24 -10
  156. package/resources/parsing/jobs.d.mts.map +1 -1
  157. package/resources/parsing/jobs.d.ts +24 -10
  158. package/resources/parsing/jobs.d.ts.map +1 -1
  159. package/resources/parsing/jobs.js.map +1 -1
  160. package/resources/parsing/jobs.mjs.map +1 -1
  161. package/resources/parsing/parsing.d.mts +2 -2
  162. package/resources/parsing/parsing.d.mts.map +1 -1
  163. package/resources/parsing/parsing.d.ts +2 -2
  164. package/resources/parsing/parsing.d.ts.map +1 -1
  165. package/resources/parsing/parsing.js.map +1 -1
  166. package/resources/parsing/parsing.mjs.map +1 -1
  167. package/resources/top-level.d.mts +5 -4
  168. package/resources/top-level.d.mts.map +1 -1
  169. package/resources/top-level.d.ts +5 -4
  170. package/resources/top-level.d.ts.map +1 -1
  171. package/resources/vector-stores/files.d.mts +79 -19
  172. package/resources/vector-stores/files.d.mts.map +1 -1
  173. package/resources/vector-stores/files.d.ts +79 -19
  174. package/resources/vector-stores/files.d.ts.map +1 -1
  175. package/resources/vector-stores/files.js +19 -18
  176. package/resources/vector-stores/files.js.map +1 -1
  177. package/resources/vector-stores/files.mjs +19 -18
  178. package/resources/vector-stores/files.mjs.map +1 -1
  179. package/resources/vector-stores/index.d.mts +1 -1
  180. package/resources/vector-stores/index.d.mts.map +1 -1
  181. package/resources/vector-stores/index.d.ts +1 -1
  182. package/resources/vector-stores/index.d.ts.map +1 -1
  183. package/resources/vector-stores/index.js.map +1 -1
  184. package/resources/vector-stores/index.mjs.map +1 -1
  185. package/resources/vector-stores/vector-stores.d.mts +275 -90
  186. package/resources/vector-stores/vector-stores.d.mts.map +1 -1
  187. package/resources/vector-stores/vector-stores.d.ts +275 -90
  188. package/resources/vector-stores/vector-stores.d.ts.map +1 -1
  189. package/resources/vector-stores/vector-stores.js +18 -15
  190. package/resources/vector-stores/vector-stores.js.map +1 -1
  191. package/resources/vector-stores/vector-stores.mjs +18 -15
  192. package/resources/vector-stores/vector-stores.mjs.map +1 -1
  193. package/src/client.ts +63 -30
  194. package/src/core/pagination.ts +1 -1
  195. package/src/core/resource.ts +1 -1
  196. package/src/internal/detect-platform.ts +3 -3
  197. package/src/internal/headers.ts +6 -6
  198. package/src/internal/shim-types.ts +26 -0
  199. package/src/internal/shims.ts +2 -2
  200. package/src/internal/uploads.ts +2 -2
  201. package/src/internal/utils/log.ts +1 -1
  202. package/src/internal/utils/path.ts +1 -1
  203. package/src/internal/utils/values.ts +3 -0
  204. package/src/resources/api-keys.ts +225 -0
  205. package/src/resources/data-sources/connectors.ts +290 -0
  206. package/src/resources/data-sources/data-sources.ts +404 -0
  207. package/src/resources/data-sources/index.ts +24 -0
  208. package/src/resources/data-sources.ts +3 -0
  209. package/src/resources/embeddings.ts +25 -19
  210. package/src/resources/extractions/content.ts +51 -43
  211. package/src/resources/extractions/extractions.ts +3 -1
  212. package/src/resources/extractions/index.ts +7 -1
  213. package/src/resources/extractions/jobs.ts +2 -1
  214. package/src/resources/files.ts +21 -0
  215. package/src/resources/index.ts +26 -4
  216. package/src/resources/parsing/index.ts +4 -0
  217. package/src/resources/parsing/jobs.ts +42 -44
  218. package/src/resources/parsing/parsing.ts +8 -0
  219. package/src/resources/top-level.ts +5 -44
  220. package/src/resources/vector-stores/files.ts +104 -28
  221. package/src/resources/vector-stores/index.ts +4 -3
  222. package/src/resources/vector-stores/vector-stores.ts +330 -102
  223. package/src/version.ts +1 -1
  224. package/version.d.mts +1 -1
  225. package/version.d.ts +1 -1
  226. package/version.js +1 -1
  227. package/version.mjs +1 -1
  228. package/src/internal/shim-types.d.ts +0 -28
@@ -37,37 +37,38 @@ export class VectorStores extends APIResource {
37
37
  }
38
38
 
39
39
  /**
40
- * Get a vector store by ID.
40
+ * Get a vector store by ID or name.
41
41
  *
42
- * Args: vector_store_id: The ID of the vector store to retrieve.
42
+ * Args: vector_store_identifier: The ID or name of the vector store to retrieve.
43
43
  *
44
44
  * Returns: VectorStore: The response containing the vector store details.
45
45
  */
46
- retrieve(vectorStoreID: string, options?: RequestOptions): APIPromise<VectorStore> {
47
- return this._client.get(path`/v1/vector_stores/${vectorStoreID}`, options);
46
+ retrieve(vectorStoreIdentifier: string, options?: RequestOptions): APIPromise<VectorStore> {
47
+ return this._client.get(path`/v1/vector_stores/${vectorStoreIdentifier}`, options);
48
48
  }
49
49
 
50
50
  /**
51
- * Update a vector store by ID.
51
+ * Update a vector store by ID or name.
52
52
  *
53
- * Args: vector_store_id: The ID of the vector store to update.
53
+ * Args: vector_store_identifier: The ID or name of the vector store to update.
54
54
  * vector_store_update: VectorStoreCreate object containing the name, description,
55
55
  * and metadata.
56
56
  *
57
57
  * Returns: VectorStore: The response containing the updated vector store details.
58
58
  */
59
59
  update(
60
- vectorStoreID: string,
60
+ vectorStoreIdentifier: string,
61
61
  body: VectorStoreUpdateParams,
62
62
  options?: RequestOptions,
63
63
  ): APIPromise<VectorStore> {
64
- return this._client.put(path`/v1/vector_stores/${vectorStoreID}`, { body, ...options });
64
+ return this._client.put(path`/v1/vector_stores/${vectorStoreIdentifier}`, { body, ...options });
65
65
  }
66
66
 
67
67
  /**
68
- * List all vector stores.
68
+ * List all vector stores with optional search.
69
69
  *
70
- * Args: pagination: The pagination options.
70
+ * Args: pagination: The pagination options. q: Optional search query to filter
71
+ * vector stores.
71
72
  *
72
73
  * Returns: VectorStoreListResponse: The list of vector stores.
73
74
  */
@@ -79,14 +80,14 @@ export class VectorStores extends APIResource {
79
80
  }
80
81
 
81
82
  /**
82
- * Delete a vector store by ID.
83
+ * Delete a vector store by ID or name.
83
84
  *
84
- * Args: vector_store_id: The ID of the vector store to delete.
85
+ * Args: vector_store_identifier: The ID or name of the vector store to delete.
85
86
  *
86
87
  * Returns: VectorStore: The response containing the deleted vector store details.
87
88
  */
88
- delete(vectorStoreID: string, options?: RequestOptions): APIPromise<VectorStoreDeleteResponse> {
89
- return this._client.delete(path`/v1/vector_stores/${vectorStoreID}`, options);
89
+ delete(vectorStoreIdentifier: string, options?: RequestOptions): APIPromise<VectorStoreDeleteResponse> {
90
+ return this._client.delete(path`/v1/vector_stores/${vectorStoreIdentifier}`, options);
90
91
  }
91
92
 
92
93
  /**
@@ -107,7 +108,9 @@ export class VectorStores extends APIResource {
107
108
  * relevance-scored results.
108
109
  *
109
110
  * Args: search_params: Search configuration including: - query text or
110
- * embeddings - metadata filters - pagination parameters - sorting preferences
111
+ * embeddings - vector_store_ids: List of vector stores to search - file_ids:
112
+ * Optional list of file IDs to filter chunks by (or tuple of list and condition
113
+ * operator) - metadata filters - pagination parameters - sorting preferences
111
114
  * \_state: API state dependency \_ctx: Service context dependency
112
115
  *
113
116
  * Returns: VectorStoreSearchChunkResponse containing: - List of matched chunks
@@ -138,56 +141,95 @@ export interface ExpiresAfter {
138
141
  days?: number;
139
142
  }
140
143
 
141
- /**
142
- * Tracks counts of files in different states within a vector store.
143
- */
144
- export interface FileCounts {
144
+ export interface ScoredAudioURLInputChunk {
145
+ /**
146
+ * position of the chunk in a file
147
+ */
148
+ chunk_index: number;
149
+
150
+ /**
151
+ * mime type of the chunk
152
+ */
153
+ mime_type?: string;
154
+
155
+ /**
156
+ * model used for this chunk
157
+ */
158
+ model?: string | null;
159
+
160
+ /**
161
+ * score of the chunk
162
+ */
163
+ score: number;
164
+
165
+ /**
166
+ * file id
167
+ */
168
+ file_id: string;
169
+
170
+ /**
171
+ * filename
172
+ */
173
+ filename: string;
174
+
145
175
  /**
146
- * Number of files currently being processed
176
+ * vector store id
177
+ */
178
+ vector_store_id: string;
179
+
180
+ /**
181
+ * file metadata
182
+ */
183
+ metadata?: unknown;
184
+
185
+ /**
186
+ * Input type identifier
147
187
  */
148
- in_progress?: number;
188
+ type?: 'audio_url';
149
189
 
150
190
  /**
151
- * Number of files whose processing was cancelled
191
+ * The audio input specification.
152
192
  */
153
- cancelled?: number;
193
+ audio_url: ScoredAudioURLInputChunk.AudioURL;
154
194
 
155
195
  /**
156
- * Number of successfully processed files
196
+ * speech recognition (sr) text of the audio
157
197
  */
158
- completed?: number;
198
+ transcription?: string | null;
159
199
 
160
200
  /**
161
- * Number of files that failed processing
201
+ * summary of the audio
162
202
  */
163
- failed?: number;
203
+ summary?: string | null;
204
+ }
164
205
 
206
+ export namespace ScoredAudioURLInputChunk {
165
207
  /**
166
- * Total number of files
208
+ * The audio input specification.
167
209
  */
168
- total?: number;
210
+ export interface AudioURL {
211
+ /**
212
+ * The audio URL. Can be either a URL or a Data URI.
213
+ */
214
+ url: string;
215
+ }
169
216
  }
170
217
 
171
- export interface ScoredVectorStoreChunk {
218
+ export interface ScoredImageURLInputChunk {
172
219
  /**
173
220
  * position of the chunk in a file
174
221
  */
175
- position: number;
222
+ chunk_index: number;
176
223
 
177
224
  /**
178
- * value of the chunk
225
+ * mime type of the chunk
179
226
  */
180
- value?:
181
- | string
182
- | ScoredVectorStoreChunk.ImageURLInput
183
- | ScoredVectorStoreChunk.TextInput
184
- | Record<string, unknown>
185
- | null;
227
+ mime_type?: string;
186
228
 
187
229
  /**
188
- * content of the chunk
230
+ * model used for this chunk
189
231
  */
190
- content?: string | null;
232
+ model?: string | null;
191
233
 
192
234
  /**
193
235
  * score of the chunk
@@ -213,52 +255,168 @@ export interface ScoredVectorStoreChunk {
213
255
  * file metadata
214
256
  */
215
257
  metadata?: unknown;
258
+
259
+ /**
260
+ * Input type identifier
261
+ */
262
+ type?: 'image_url';
263
+
264
+ /**
265
+ * The image input specification.
266
+ */
267
+ image_url: ScoredImageURLInputChunk.ImageURL;
268
+
269
+ /**
270
+ * ocr text of the image
271
+ */
272
+ ocr_text?: string | null;
273
+
274
+ /**
275
+ * summary of the image
276
+ */
277
+ summary?: string | null;
216
278
  }
217
279
 
218
- export namespace ScoredVectorStoreChunk {
280
+ export namespace ScoredImageURLInputChunk {
219
281
  /**
220
- * Model for image input validation.
282
+ * The image input specification.
221
283
  */
222
- export interface ImageURLInput {
284
+ export interface ImageURL {
223
285
  /**
224
- * Input type identifier
286
+ * The image URL. Can be either a URL or a Data URI.
225
287
  */
226
- type?: 'image_url';
288
+ url: string;
227
289
 
228
290
  /**
229
- * The image input specification.
291
+ * The image format/mimetype
230
292
  */
231
- image_url: ImageURLInput.ImageURL;
293
+ format?: string;
232
294
  }
295
+ }
233
296
 
234
- export namespace ImageURLInput {
235
- /**
236
- * The image input specification.
237
- */
238
- export interface ImageURL {
239
- /**
240
- * The image URL. Can be either a URL or a Data URI.
241
- */
242
- url: string;
243
- }
244
- }
297
+ export interface ScoredTextInputChunk {
298
+ /**
299
+ * position of the chunk in a file
300
+ */
301
+ chunk_index: number;
245
302
 
246
303
  /**
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
304
+ * mime type of the chunk
251
305
  */
252
- export interface TextInput {
253
- /**
254
- * Input type identifier
255
- */
256
- type?: 'text';
306
+ mime_type?: string;
307
+
308
+ /**
309
+ * model used for this chunk
310
+ */
311
+ model?: string | null;
312
+
313
+ /**
314
+ * score of the chunk
315
+ */
316
+ score: number;
317
+
318
+ /**
319
+ * file id
320
+ */
321
+ file_id: string;
322
+
323
+ /**
324
+ * filename
325
+ */
326
+ filename: string;
327
+
328
+ /**
329
+ * vector store id
330
+ */
331
+ vector_store_id: string;
332
+
333
+ /**
334
+ * file metadata
335
+ */
336
+ metadata?: unknown;
337
+
338
+ /**
339
+ * Input type identifier
340
+ */
341
+ type?: 'text';
342
+
343
+ /**
344
+ * Text content to process
345
+ */
346
+ text: string;
347
+ }
348
+
349
+ export interface ScoredVideoURLInputChunk {
350
+ /**
351
+ * position of the chunk in a file
352
+ */
353
+ chunk_index: number;
354
+
355
+ /**
356
+ * mime type of the chunk
357
+ */
358
+ mime_type?: string;
359
+
360
+ /**
361
+ * model used for this chunk
362
+ */
363
+ model?: string | null;
364
+
365
+ /**
366
+ * score of the chunk
367
+ */
368
+ score: number;
369
+
370
+ /**
371
+ * file id
372
+ */
373
+ file_id: string;
374
+
375
+ /**
376
+ * filename
377
+ */
378
+ filename: string;
379
+
380
+ /**
381
+ * vector store id
382
+ */
383
+ vector_store_id: string;
384
+
385
+ /**
386
+ * file metadata
387
+ */
388
+ metadata?: unknown;
257
389
 
390
+ /**
391
+ * Input type identifier
392
+ */
393
+ type?: 'video_url';
394
+
395
+ /**
396
+ * The video input specification.
397
+ */
398
+ video_url: ScoredVideoURLInputChunk.VideoURL;
399
+
400
+ /**
401
+ * speech recognition (sr) text of the video
402
+ */
403
+ transcription?: string | null;
404
+
405
+ /**
406
+ * summary of the video
407
+ */
408
+ summary?: string | null;
409
+ }
410
+
411
+ export namespace ScoredVideoURLInputChunk {
412
+ /**
413
+ * The video input specification.
414
+ */
415
+ export interface VideoURL {
258
416
  /**
259
- * Text content to process
417
+ * The video URL. Can be either a URL or a Data URI.
260
418
  */
261
- text: string;
419
+ url: string;
262
420
  }
263
421
  }
264
422
 
@@ -289,7 +447,7 @@ export interface VectorStore {
289
447
  /**
290
448
  * Counts of files in different states
291
449
  */
292
- file_counts?: FileCounts;
450
+ file_counts?: VectorStore.FileCounts;
293
451
 
294
452
  /**
295
453
  * Represents an expiration policy for a vector store.
@@ -332,30 +490,47 @@ export interface VectorStore {
332
490
  object?: 'vector_store';
333
491
  }
334
492
 
335
- /**
336
- * Options for configuring vector store chunk searches.
337
- */
338
- export interface VectorStoreChunkSearchOptions {
493
+ export namespace VectorStore {
339
494
  /**
340
- * Minimum similarity score threshold
495
+ * Counts of files in different states
341
496
  */
342
- score_threshold?: number;
497
+ export interface FileCounts {
498
+ /**
499
+ * Number of files waiting to be processed
500
+ */
501
+ pending?: number;
343
502
 
344
- /**
345
- * Whether to rewrite the query
346
- */
347
- rewrite_query?: boolean;
503
+ /**
504
+ * Number of files currently being processed
505
+ */
506
+ in_progress?: number;
348
507
 
349
- /**
350
- * Whether to return file metadata
351
- */
352
- return_metadata?: boolean;
508
+ /**
509
+ * Number of files whose processing was cancelled
510
+ */
511
+ cancelled?: number;
512
+
513
+ /**
514
+ * Number of successfully processed files
515
+ */
516
+ completed?: number;
517
+
518
+ /**
519
+ * Number of files that failed processing
520
+ */
521
+ failed?: number;
522
+
523
+ /**
524
+ * Total number of files
525
+ */
526
+ total?: number;
527
+ }
353
528
  }
354
529
 
355
530
  /**
356
- * Options for configuring vector store file searches.
531
+ * Options for configuring vector store chunk searches.
357
532
  */
358
- export interface VectorStoreFileSearchOptions {
533
+ export interface VectorStoreChunkSearchOptions {
359
534
  /**
360
535
  * Minimum similarity score threshold
361
536
  */
@@ -367,19 +542,37 @@ export interface VectorStoreFileSearchOptions {
367
542
  rewrite_query?: boolean;
368
543
 
369
544
  /**
370
- * Whether to return file metadata
545
+ * Whether to rerank results and optional reranking configuration
371
546
  */
372
- return_metadata?: boolean;
547
+ rerank?: boolean | VectorStoreChunkSearchOptions.RerankConfig | null;
373
548
 
374
549
  /**
375
- * Whether to return matching text chunks
550
+ * Whether to return file metadata
376
551
  */
377
- return_chunks?: boolean;
552
+ return_metadata?: boolean;
553
+ }
378
554
 
555
+ export namespace VectorStoreChunkSearchOptions {
379
556
  /**
380
- * Number of chunks to return for each file
557
+ * Represents a reranking configuration.
381
558
  */
382
- chunks_per_file?: number;
559
+ export interface RerankConfig {
560
+ /**
561
+ * The name of the reranking model
562
+ */
563
+ model?: string;
564
+
565
+ /**
566
+ * Whether to include metadata in the reranked results
567
+ */
568
+ with_metadata?: boolean | Array<string>;
569
+
570
+ /**
571
+ * Maximum number of results to return after reranking. If None, returns all
572
+ * reranked results.
573
+ */
574
+ top_k?: number | null;
575
+ }
383
576
  }
384
577
 
385
578
  /**
@@ -414,7 +607,9 @@ export interface VectorStoreQuestionAnsweringResponse {
414
607
  /**
415
608
  * Source documents used to generate the answer
416
609
  */
417
- sources?: Array<ScoredVectorStoreChunk>;
610
+ sources?: Array<
611
+ ScoredTextInputChunk | ScoredImageURLInputChunk | ScoredAudioURLInputChunk | ScoredVideoURLInputChunk
612
+ >;
418
613
  }
419
614
 
420
615
  export interface VectorStoreSearchResponse {
@@ -426,7 +621,9 @@ export interface VectorStoreSearchResponse {
426
621
  /**
427
622
  * The list of scored vector store file chunks
428
623
  */
429
- data: Array<ScoredVectorStoreChunk>;
624
+ data: Array<
625
+ ScoredTextInputChunk | ScoredImageURLInputChunk | ScoredAudioURLInputChunk | ScoredVideoURLInputChunk
626
+ >;
430
627
  }
431
628
 
432
629
  export interface VectorStoreCreateParams {
@@ -478,7 +675,12 @@ export interface VectorStoreUpdateParams {
478
675
  metadata?: unknown;
479
676
  }
480
677
 
481
- export interface VectorStoreListParams extends LimitOffsetParams {}
678
+ export interface VectorStoreListParams extends LimitOffsetParams {
679
+ /**
680
+ * Search query for fuzzy matching over name and description fields
681
+ */
682
+ q?: string | null;
683
+ }
482
684
 
483
685
  export interface VectorStoreQuestionAnsweringParams {
484
686
  /**
@@ -488,9 +690,14 @@ export interface VectorStoreQuestionAnsweringParams {
488
690
  query?: string;
489
691
 
490
692
  /**
491
- * IDs of vector stores to search
693
+ * IDs or names of vector stores to search
694
+ */
695
+ vector_store_identifiers?: Array<string> | null;
696
+
697
+ /**
698
+ * @deprecated
492
699
  */
493
- vector_store_ids: Array<string>;
700
+ vector_store_ids?: Array<string> | null;
494
701
 
495
702
  /**
496
703
  * Number of results to return
@@ -506,6 +713,11 @@ export interface VectorStoreQuestionAnsweringParams {
506
713
  | Array<Shared.SearchFilter | Shared.SearchFilterCondition>
507
714
  | null;
508
715
 
716
+ /**
717
+ * Optional list of file IDs to filter chunks by (inclusion filter)
718
+ */
719
+ file_ids?: Array<unknown> | Array<string> | null;
720
+
509
721
  /**
510
722
  * Search configuration options
511
723
  */
@@ -531,6 +743,11 @@ export namespace VectorStoreQuestionAnsweringParams {
531
743
  * Whether to use citations
532
744
  */
533
745
  cite?: boolean;
746
+
747
+ /**
748
+ * Whether to use multimodal context
749
+ */
750
+ multimodal?: boolean;
534
751
  }
535
752
  }
536
753
 
@@ -541,9 +758,14 @@ export interface VectorStoreSearchParams {
541
758
  query: string;
542
759
 
543
760
  /**
544
- * IDs of vector stores to search
761
+ * IDs or names of vector stores to search
545
762
  */
546
- vector_store_ids: Array<string>;
763
+ vector_store_identifiers?: Array<string> | null;
764
+
765
+ /**
766
+ * @deprecated
767
+ */
768
+ vector_store_ids?: Array<string> | null;
547
769
 
548
770
  /**
549
771
  * Number of results to return
@@ -559,6 +781,11 @@ export interface VectorStoreSearchParams {
559
781
  | Array<Shared.SearchFilter | Shared.SearchFilterCondition>
560
782
  | null;
561
783
 
784
+ /**
785
+ * Optional list of file IDs to filter chunks by (inclusion filter)
786
+ */
787
+ file_ids?: Array<unknown> | Array<string> | null;
788
+
562
789
  /**
563
790
  * Search configuration options
564
791
  */
@@ -570,11 +797,12 @@ VectorStores.Files = Files;
570
797
  export declare namespace VectorStores {
571
798
  export {
572
799
  type ExpiresAfter as ExpiresAfter,
573
- type FileCounts as FileCounts,
574
- type ScoredVectorStoreChunk as ScoredVectorStoreChunk,
800
+ type ScoredAudioURLInputChunk as ScoredAudioURLInputChunk,
801
+ type ScoredImageURLInputChunk as ScoredImageURLInputChunk,
802
+ type ScoredTextInputChunk as ScoredTextInputChunk,
803
+ type ScoredVideoURLInputChunk as ScoredVideoURLInputChunk,
575
804
  type VectorStore as VectorStore,
576
805
  type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions,
577
- type VectorStoreFileSearchOptions as VectorStoreFileSearchOptions,
578
806
  type VectorStoreDeleteResponse as VectorStoreDeleteResponse,
579
807
  type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse,
580
808
  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.7.2'; // 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.7.2";
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.7.2";
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.7.2'; // 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.7.2'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1,28 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- /**
4
- * Shims for types that we can't always rely on being available globally.
5
- *
6
- * Note: these only exist at the type-level, there is no corresponding runtime
7
- * version for any of these symbols.
8
- */
9
-
10
- /**
11
- * In order to properly access the global `NodeJS` type, if it's available, we
12
- * need to make use of declaration shadowing. Without this, any checks for the
13
- * presence of `NodeJS.ReadableStream` will fail.
14
- */
15
- declare namespace NodeJS {
16
- interface ReadableStream {}
17
- }
18
-
19
- type HasProperties<T> = keyof T extends never ? false : true;
20
-
21
- // @ts-ignore
22
- type _ReadableStream<R = any> =
23
- // @ts-ignore
24
- HasProperties<NodeJS.ReadableStream> extends true ? NodeJS.ReadableStream<R> : ReadableStream<R>;
25
-
26
- // @ts-ignore
27
- declare const _ReadableStream: unknown extends typeof ReadableStream ? never : typeof ReadableStream;
28
- export { _ReadableStream as ReadableStream };