@mixedbread/sdk 0.30.0 → 0.31.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 (77) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +18 -18
  3. package/bin/migration-config.json +70 -0
  4. package/client.d.mts +3 -0
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +3 -0
  7. package/client.d.ts.map +1 -1
  8. package/client.js +3 -0
  9. package/client.js.map +1 -1
  10. package/client.mjs +3 -0
  11. package/client.mjs.map +1 -1
  12. package/package.json +1 -1
  13. package/resources/index.d.mts +1 -0
  14. package/resources/index.d.mts.map +1 -1
  15. package/resources/index.d.ts +1 -0
  16. package/resources/index.d.ts.map +1 -1
  17. package/resources/index.js +3 -1
  18. package/resources/index.js.map +1 -1
  19. package/resources/index.mjs +1 -0
  20. package/resources/index.mjs.map +1 -1
  21. package/resources/stores/files.d.mts +547 -0
  22. package/resources/stores/files.d.mts.map +1 -0
  23. package/resources/stores/files.d.ts +547 -0
  24. package/resources/stores/files.d.ts.map +1 -0
  25. package/resources/stores/files.js +68 -0
  26. package/resources/stores/files.js.map +1 -0
  27. package/resources/stores/files.mjs +64 -0
  28. package/resources/stores/files.mjs.map +1 -0
  29. package/resources/stores/index.d.mts +3 -0
  30. package/resources/stores/index.d.mts.map +1 -0
  31. package/resources/stores/index.d.ts +3 -0
  32. package/resources/stores/index.d.ts.map +1 -0
  33. package/resources/stores/index.js +9 -0
  34. package/resources/stores/index.js.map +1 -0
  35. package/resources/stores/index.mjs +4 -0
  36. package/resources/stores/index.mjs.map +1 -0
  37. package/resources/stores/stores.d.mts +372 -0
  38. package/resources/stores/stores.d.mts.map +1 -0
  39. package/resources/stores/stores.d.ts +372 -0
  40. package/resources/stores/stores.d.ts.map +1 -0
  41. package/resources/stores/stores.js +100 -0
  42. package/resources/stores/stores.js.map +1 -0
  43. package/resources/stores/stores.mjs +95 -0
  44. package/resources/stores/stores.mjs.map +1 -0
  45. package/resources/stores.d.mts +2 -0
  46. package/resources/stores.d.mts.map +1 -0
  47. package/resources/stores.d.ts +2 -0
  48. package/resources/stores.d.ts.map +1 -0
  49. package/resources/stores.js +6 -0
  50. package/resources/stores.js.map +1 -0
  51. package/resources/stores.mjs +3 -0
  52. package/resources/stores.mjs.map +1 -0
  53. package/resources/vector-stores/files.d.mts +11 -10
  54. package/resources/vector-stores/files.d.mts.map +1 -1
  55. package/resources/vector-stores/files.d.ts +11 -10
  56. package/resources/vector-stores/files.d.ts.map +1 -1
  57. package/resources/vector-stores/files.js +5 -5
  58. package/resources/vector-stores/files.js.map +1 -1
  59. package/resources/vector-stores/files.mjs +5 -5
  60. package/resources/vector-stores/files.mjs.map +1 -1
  61. package/resources/vector-stores/vector-stores.d.mts +7 -7
  62. package/resources/vector-stores/vector-stores.d.ts +7 -7
  63. package/resources/vector-stores/vector-stores.js +7 -7
  64. package/resources/vector-stores/vector-stores.mjs +7 -7
  65. package/src/client.ts +31 -0
  66. package/src/resources/index.ts +14 -0
  67. package/src/resources/stores/files.ts +692 -0
  68. package/src/resources/stores/index.ts +30 -0
  69. package/src/resources/stores/stores.ts +523 -0
  70. package/src/resources/stores.ts +3 -0
  71. package/src/resources/vector-stores/files.ts +11 -10
  72. package/src/resources/vector-stores/vector-stores.ts +7 -7
  73. package/src/version.ts +1 -1
  74. package/version.d.mts +1 -1
  75. package/version.d.ts +1 -1
  76. package/version.js +1 -1
  77. package/version.mjs +1 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.VectorStores = exports.Parsing = exports.Files = exports.Extractions = exports.Embeddings = exports.DataSources = exports.Chat = exports.APIKeys = void 0;
4
+ exports.VectorStores = exports.Stores = exports.Parsing = exports.Files = exports.Extractions = exports.Embeddings = exports.DataSources = exports.Chat = exports.APIKeys = void 0;
5
5
  const tslib_1 = require("../internal/tslib.js");
6
6
  tslib_1.__exportStar(require("./shared.js"), exports);
7
7
  var api_keys_1 = require("./api-keys.js");
@@ -18,6 +18,8 @@ var files_1 = require("./files.js");
18
18
  Object.defineProperty(exports, "Files", { enumerable: true, get: function () { return files_1.Files; } });
19
19
  var parsing_1 = require("./parsing/parsing.js");
20
20
  Object.defineProperty(exports, "Parsing", { enumerable: true, get: function () { return parsing_1.Parsing; } });
21
+ var stores_1 = require("./stores/stores.js");
22
+ Object.defineProperty(exports, "Stores", { enumerable: true, get: function () { return stores_1.Stores; } });
21
23
  var vector_stores_1 = require("./vector-stores/vector-stores.js");
22
24
  Object.defineProperty(exports, "VectorStores", { enumerable: true, get: function () { return vector_stores_1.VectorStores; } });
23
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sDAAyB;AACzB,0CAQoB;AAPlB,mGAAA,OAAO,OAAA;AAQT,kCAAiE;AAAxD,4FAAA,IAAI,OAAA;AACb,+DAaqC;AAZnC,2GAAA,WAAW,OAAA;AAab,8CAA2F;AAAlF,wGAAA,UAAU,OAAA;AACnB,4DAAwD;AAA/C,0GAAA,WAAW,OAAA;AACpB,oCASiB;AARf,8FAAA,KAAK,OAAA;AASP,gDAA4C;AAAnC,kGAAA,OAAO,OAAA;AAChB,kEAkBuC;AAjBrC,6GAAA,YAAY,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,sDAAyB;AACzB,0CAQoB;AAPlB,mGAAA,OAAO,OAAA;AAQT,kCAAiE;AAAxD,4FAAA,IAAI,OAAA;AACb,+DAaqC;AAZnC,2GAAA,WAAW,OAAA;AAab,8CAA2F;AAAlF,wGAAA,UAAU,OAAA;AACnB,4DAAwD;AAA/C,0GAAA,WAAW,OAAA;AACpB,oCASiB;AARf,8FAAA,KAAK,OAAA;AASP,gDAA4C;AAAnC,kGAAA,OAAO,OAAA;AAChB,6CAayB;AAZvB,gGAAA,MAAM,OAAA;AAaR,kEAkBuC;AAjBrC,6GAAA,YAAY,OAAA"}
@@ -7,5 +7,6 @@ export { Embeddings } from "./embeddings.mjs";
7
7
  export { Extractions } from "./extractions/extractions.mjs";
8
8
  export { Files, } from "./files.mjs";
9
9
  export { Parsing } from "./parsing/parsing.mjs";
10
+ export { Stores, } from "./stores/stores.mjs";
10
11
  export { VectorStores, } from "./vector-stores/vector-stores.mjs";
11
12
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,OAAO,GAOR;OACM,EAAE,IAAI,EAAqC;OAC3C,EACL,WAAW,GAYZ;OACM,EAAE,UAAU,EAAmD;OAC/D,EAAE,WAAW,EAAE;OACf,EACL,KAAK,GAQN;OACM,EAAE,OAAO,EAAE;OACX,EACL,YAAY,GAiBb"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,OAAO,GAOR;OACM,EAAE,IAAI,EAAqC;OAC3C,EACL,WAAW,GAYZ;OACM,EAAE,UAAU,EAAmD;OAC/D,EAAE,WAAW,EAAE;OACf,EACL,KAAK,GAQN;OACM,EAAE,OAAO,EAAE;OACX,EACL,MAAM,GAYP;OACM,EACL,YAAY,GAiBb"}
@@ -0,0 +1,547 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as Shared from "../shared.mjs";
3
+ import * as VectorStoresFilesAPI from "../vector-stores/files.mjs";
4
+ import * as VectorStoresAPI from "../vector-stores/vector-stores.mjs";
5
+ import { APIPromise } from "../../core/api-promise.mjs";
6
+ import { RequestOptions } from "../../internal/request-options.mjs";
7
+ export declare class Files extends APIResource {
8
+ /**
9
+ * Upload a file to a store.
10
+ *
11
+ * Args: store_identifier: The ID or name of the store. file_add_params: The file
12
+ * to add to the store.
13
+ *
14
+ * Returns: VectorStoreFile: The uploaded file details.
15
+ */
16
+ create(storeIdentifier: string, body: FileCreateParams, options?: RequestOptions): APIPromise<StoreFile>;
17
+ /**
18
+ * Get a file from a store.
19
+ *
20
+ * Args: store_identifier: The ID or name of the store. file_id: The ID or name of
21
+ * the file. options: Get file options.
22
+ *
23
+ * Returns: VectorStoreFile: The file details.
24
+ */
25
+ retrieve(fileID: string, params: FileRetrieveParams, options?: RequestOptions): APIPromise<StoreFile>;
26
+ /**
27
+ * List files indexed in a vector store with pagination and metadata filter.
28
+ *
29
+ * Args: vector_store_identifier: The ID or name of the vector store pagination:
30
+ * Pagination parameters and metadata filter
31
+ *
32
+ * Returns: VectorStoreFileListResponse: Paginated list of vector store files
33
+ */
34
+ list(storeIdentifier: string, body: FileListParams, options?: RequestOptions): APIPromise<FileListResponse>;
35
+ /**
36
+ * Delete a file from a store.
37
+ *
38
+ * Args: store_identifier: The ID or name of the store. file_id: The ID or name of
39
+ * the file to delete.
40
+ *
41
+ * Returns: VectorStoreFileDeleted: The deleted file details.
42
+ */
43
+ delete(fileID: string, params: FileDeleteParams, options?: RequestOptions): APIPromise<FileDeleteResponse>;
44
+ /**
45
+ * Search for files within a store based on semantic similarity.
46
+ *
47
+ * Args: store_identifier: The ID or name of the store to search within
48
+ * search_params: Search configuration including query text, pagination, and
49
+ * filters
50
+ *
51
+ * Returns: StoreFileSearchResponse: List of matching files with relevance scores
52
+ */
53
+ search(body: FileSearchParams, options?: RequestOptions): APIPromise<FileSearchResponse>;
54
+ }
55
+ /**
56
+ * Represents a scored store file.
57
+ */
58
+ export interface ScoredStoreFile {
59
+ /**
60
+ * Unique identifier for the file
61
+ */
62
+ id: string;
63
+ /**
64
+ * Name of the file
65
+ */
66
+ filename?: string;
67
+ /**
68
+ * Optional file metadata
69
+ */
70
+ metadata?: unknown;
71
+ /**
72
+ * Processing status of the file
73
+ */
74
+ status?: StoreFileStatus;
75
+ /**
76
+ * Last error message if processing failed
77
+ */
78
+ last_error?: unknown;
79
+ /**
80
+ * ID of the containing store
81
+ */
82
+ store_id: string;
83
+ /**
84
+ * Timestamp of store file creation
85
+ */
86
+ created_at: string;
87
+ /**
88
+ * Version number of the file
89
+ */
90
+ version?: number | null;
91
+ /**
92
+ * Storage usage in bytes
93
+ */
94
+ usage_bytes?: number | null;
95
+ /**
96
+ * Type of the object
97
+ */
98
+ object?: 'store.file';
99
+ /**
100
+ * Array of scored file chunks
101
+ */
102
+ chunks: Array<VectorStoresAPI.ScoredTextInputChunk | VectorStoresAPI.ScoredImageURLInputChunk | VectorStoresAPI.ScoredAudioURLInputChunk | VectorStoresAPI.ScoredVideoURLInputChunk> | null;
103
+ /**
104
+ * score of the file
105
+ */
106
+ score: number;
107
+ }
108
+ export type StoreFileStatus = 'pending' | 'in_progress' | 'cancelled' | 'completed' | 'failed';
109
+ /**
110
+ * Represents a file stored in a store.
111
+ */
112
+ export interface StoreFile {
113
+ /**
114
+ * Unique identifier for the file
115
+ */
116
+ id: string;
117
+ /**
118
+ * Name of the file
119
+ */
120
+ filename?: string;
121
+ /**
122
+ * Optional file metadata
123
+ */
124
+ metadata?: unknown;
125
+ /**
126
+ * Processing status of the file
127
+ */
128
+ status?: StoreFileStatus;
129
+ /**
130
+ * Last error message if processing failed
131
+ */
132
+ last_error?: unknown;
133
+ /**
134
+ * ID of the containing store
135
+ */
136
+ store_id: string;
137
+ /**
138
+ * Timestamp of store file creation
139
+ */
140
+ created_at: string;
141
+ /**
142
+ * Version number of the file
143
+ */
144
+ version?: number | null;
145
+ /**
146
+ * Storage usage in bytes
147
+ */
148
+ usage_bytes?: number | null;
149
+ /**
150
+ * Type of the object
151
+ */
152
+ object?: 'store.file';
153
+ /**
154
+ * chunks
155
+ */
156
+ chunks?: Array<StoreFile.TextInputChunk | StoreFile.ImageURLInputChunk | StoreFile.AudioURLInputChunk | StoreFile.VideoURLInputChunk> | null;
157
+ }
158
+ export declare namespace StoreFile {
159
+ interface TextInputChunk {
160
+ /**
161
+ * position of the chunk in a file
162
+ */
163
+ chunk_index: number;
164
+ /**
165
+ * mime type of the chunk
166
+ */
167
+ mime_type?: string;
168
+ /**
169
+ * metadata of the chunk
170
+ */
171
+ generated_metadata?: {
172
+ [key: string]: unknown;
173
+ } | null;
174
+ /**
175
+ * model used for this chunk
176
+ */
177
+ model?: string | null;
178
+ /**
179
+ * Input type identifier
180
+ */
181
+ type?: 'text';
182
+ /**
183
+ * The offset of the text in the file relative to the start of the file.
184
+ */
185
+ offset?: number;
186
+ /**
187
+ * Text content to process
188
+ */
189
+ text: string;
190
+ }
191
+ interface ImageURLInputChunk {
192
+ /**
193
+ * position of the chunk in a file
194
+ */
195
+ chunk_index: number;
196
+ /**
197
+ * mime type of the chunk
198
+ */
199
+ mime_type?: string;
200
+ /**
201
+ * metadata of the chunk
202
+ */
203
+ generated_metadata?: {
204
+ [key: string]: unknown;
205
+ } | null;
206
+ /**
207
+ * model used for this chunk
208
+ */
209
+ model?: string | null;
210
+ /**
211
+ * Input type identifier
212
+ */
213
+ type?: 'image_url';
214
+ /**
215
+ * ocr text of the image
216
+ */
217
+ ocr_text?: string | null;
218
+ /**
219
+ * summary of the image
220
+ */
221
+ summary?: string | null;
222
+ /**
223
+ * The image input specification.
224
+ */
225
+ image_url: ImageURLInputChunk.ImageURL;
226
+ }
227
+ namespace ImageURLInputChunk {
228
+ /**
229
+ * The image input specification.
230
+ */
231
+ interface ImageURL {
232
+ /**
233
+ * The image URL. Can be either a URL or a Data URI.
234
+ */
235
+ url: string;
236
+ /**
237
+ * The image format/mimetype
238
+ */
239
+ format?: string;
240
+ }
241
+ }
242
+ interface AudioURLInputChunk {
243
+ /**
244
+ * position of the chunk in a file
245
+ */
246
+ chunk_index: number;
247
+ /**
248
+ * mime type of the chunk
249
+ */
250
+ mime_type?: string;
251
+ /**
252
+ * metadata of the chunk
253
+ */
254
+ generated_metadata?: {
255
+ [key: string]: unknown;
256
+ } | null;
257
+ /**
258
+ * model used for this chunk
259
+ */
260
+ model?: string | null;
261
+ /**
262
+ * Input type identifier
263
+ */
264
+ type?: 'audio_url';
265
+ /**
266
+ * speech recognition (sr) text of the audio
267
+ */
268
+ transcription?: string | null;
269
+ /**
270
+ * summary of the audio
271
+ */
272
+ summary?: string | null;
273
+ /**
274
+ * The audio input specification.
275
+ */
276
+ audio_url: AudioURLInputChunk.AudioURL;
277
+ /**
278
+ * The sampling rate of the audio.
279
+ */
280
+ sampling_rate: number;
281
+ }
282
+ namespace AudioURLInputChunk {
283
+ /**
284
+ * The audio input specification.
285
+ */
286
+ interface AudioURL {
287
+ /**
288
+ * The audio URL. Can be either a URL or a Data URI.
289
+ */
290
+ url: string;
291
+ }
292
+ }
293
+ interface VideoURLInputChunk {
294
+ /**
295
+ * position of the chunk in a file
296
+ */
297
+ chunk_index: number;
298
+ /**
299
+ * mime type of the chunk
300
+ */
301
+ mime_type?: string;
302
+ /**
303
+ * metadata of the chunk
304
+ */
305
+ generated_metadata?: {
306
+ [key: string]: unknown;
307
+ } | null;
308
+ /**
309
+ * model used for this chunk
310
+ */
311
+ model?: string | null;
312
+ /**
313
+ * Input type identifier
314
+ */
315
+ type?: 'video_url';
316
+ /**
317
+ * speech recognition (sr) text of the video
318
+ */
319
+ transcription?: string | null;
320
+ /**
321
+ * summary of the video
322
+ */
323
+ summary?: string | null;
324
+ /**
325
+ * The video input specification.
326
+ */
327
+ video_url: VideoURLInputChunk.VideoURL;
328
+ }
329
+ namespace VideoURLInputChunk {
330
+ /**
331
+ * The video input specification.
332
+ */
333
+ interface VideoURL {
334
+ /**
335
+ * The video URL. Can be either a URL or a Data URI.
336
+ */
337
+ url: string;
338
+ }
339
+ }
340
+ }
341
+ export interface FileListResponse {
342
+ /**
343
+ * Response model for cursor-based pagination.
344
+ */
345
+ pagination: FileListResponse.Pagination;
346
+ /**
347
+ * The object type of the response
348
+ */
349
+ object?: 'list';
350
+ /**
351
+ * The list of store files
352
+ */
353
+ data: Array<StoreFile>;
354
+ }
355
+ export declare namespace FileListResponse {
356
+ /**
357
+ * Response model for cursor-based pagination.
358
+ */
359
+ interface Pagination {
360
+ /**
361
+ * Contextual direction-aware flag: True if more items exist in the requested
362
+ * pagination direction. For 'after': more items after this page. For 'before':
363
+ * more items before this page.
364
+ */
365
+ has_more: boolean;
366
+ /**
367
+ * Cursor of the first item in this page. Use for backward pagination. None if page
368
+ * is empty.
369
+ */
370
+ first_cursor: string | null;
371
+ /**
372
+ * Cursor of the last item in this page. Use for forward pagination. None if page
373
+ * is empty.
374
+ */
375
+ last_cursor: string | null;
376
+ /**
377
+ * Total number of items available across all pages. Only included when
378
+ * include_total=true was requested. Expensive operation - use sparingly.
379
+ */
380
+ total?: number | null;
381
+ }
382
+ }
383
+ /**
384
+ * Response model for file deletion.
385
+ */
386
+ export interface FileDeleteResponse {
387
+ /**
388
+ * ID of the deleted file
389
+ */
390
+ id: string;
391
+ /**
392
+ * Whether the deletion was successful
393
+ */
394
+ deleted?: boolean;
395
+ /**
396
+ * Type of the deleted object
397
+ */
398
+ object?: 'store.file';
399
+ }
400
+ export interface FileSearchResponse {
401
+ /**
402
+ * The object type of the response
403
+ */
404
+ object?: 'list';
405
+ /**
406
+ * The list of scored store files
407
+ */
408
+ data: Array<ScoredStoreFile>;
409
+ }
410
+ export interface FileCreateParams {
411
+ /**
412
+ * Optional metadata for the file
413
+ */
414
+ metadata?: unknown;
415
+ /**
416
+ * Strategy for adding the file
417
+ */
418
+ experimental?: FileCreateParams.Experimental;
419
+ /**
420
+ * ID of the file to add
421
+ */
422
+ file_id: string;
423
+ }
424
+ export declare namespace FileCreateParams {
425
+ /**
426
+ * Strategy for adding the file
427
+ */
428
+ interface Experimental {
429
+ /**
430
+ * Strategy for adding the file
431
+ */
432
+ parsing_strategy?: 'fast' | 'high_quality';
433
+ /**
434
+ * Whether to contextualize the file
435
+ */
436
+ contextualization?: boolean;
437
+ }
438
+ }
439
+ export interface FileRetrieveParams {
440
+ /**
441
+ * Path param: The ID or name of the store
442
+ */
443
+ store_identifier: string;
444
+ /**
445
+ * Query param: Whether to return the chunks for the file
446
+ */
447
+ return_chunks?: boolean;
448
+ }
449
+ export interface FileListParams {
450
+ /**
451
+ * Maximum number of items to return per page (1-100)
452
+ */
453
+ limit?: number;
454
+ /**
455
+ * Cursor for forward pagination - get items after this position. Use last_cursor
456
+ * from previous response.
457
+ */
458
+ after?: string | null;
459
+ /**
460
+ * Cursor for backward pagination - get items before this position. Use
461
+ * first_cursor from previous response.
462
+ */
463
+ before?: string | null;
464
+ /**
465
+ * Whether to include total count in response (expensive operation)
466
+ */
467
+ include_total?: boolean;
468
+ /**
469
+ * Status to filter by
470
+ */
471
+ statuses?: Array<StoreFileStatus> | null;
472
+ /**
473
+ * Metadata filter to apply to the query
474
+ */
475
+ metadata_filter?: Shared.SearchFilter | Shared.SearchFilterCondition | Array<Shared.SearchFilter | Shared.SearchFilterCondition> | null;
476
+ }
477
+ export interface FileDeleteParams {
478
+ /**
479
+ * The ID or name of the store
480
+ */
481
+ store_identifier: string;
482
+ }
483
+ export interface FileSearchParams {
484
+ /**
485
+ * Search query text
486
+ */
487
+ query: string;
488
+ /**
489
+ * IDs or names of stores to search
490
+ */
491
+ store_identifiers: Array<string>;
492
+ /**
493
+ * Number of results to return
494
+ */
495
+ top_k?: number;
496
+ /**
497
+ * Optional filter conditions
498
+ */
499
+ filters?: Shared.SearchFilter | Shared.SearchFilterCondition | Array<Shared.SearchFilter | Shared.SearchFilterCondition> | null;
500
+ /**
501
+ * Optional list of file IDs to filter chunks by (inclusion filter)
502
+ */
503
+ file_ids?: Array<unknown> | Array<string> | null;
504
+ /**
505
+ * Search configuration options
506
+ */
507
+ search_options?: FileSearchParams.SearchOptions;
508
+ }
509
+ export declare namespace FileSearchParams {
510
+ /**
511
+ * Search configuration options
512
+ */
513
+ interface SearchOptions {
514
+ /**
515
+ * Minimum similarity score threshold
516
+ */
517
+ score_threshold?: number;
518
+ /**
519
+ * Whether to rewrite the query
520
+ */
521
+ rewrite_query?: boolean;
522
+ /**
523
+ * Whether to rerank results and optional reranking configuration
524
+ */
525
+ rerank?: boolean | VectorStoresFilesAPI.RerankConfig | null;
526
+ /**
527
+ * Whether to return file metadata
528
+ */
529
+ return_metadata?: boolean;
530
+ /**
531
+ * Whether to return matching text chunks
532
+ */
533
+ return_chunks?: boolean;
534
+ /**
535
+ * Number of chunks to return for each file
536
+ */
537
+ chunks_per_file?: number;
538
+ /**
539
+ * Whether to apply search rules
540
+ */
541
+ apply_search_rules?: boolean;
542
+ }
543
+ }
544
+ export declare namespace Files {
545
+ export { type ScoredStoreFile as ScoredStoreFile, type StoreFileStatus as StoreFileStatus, type StoreFile as StoreFile, 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, };
546
+ }
547
+ //# sourceMappingURL=files.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.d.mts","sourceRoot":"","sources":["../../src/resources/stores/files.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,oBAAoB;OACzB,KAAK,eAAe;OACpB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;OAOG;IACH,MAAM,CAAC,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIxG;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAKrG;;;;;;;O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