@mixedbread/sdk 0.61.0 → 0.63.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.
- package/CHANGELOG.md +48 -0
- package/client.d.mts +28 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +28 -6
- package/client.d.ts.map +1 -1
- package/client.js +33 -0
- package/client.js.map +1 -1
- package/client.mjs +33 -0
- package/client.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/api-keys.d.mts +8 -24
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +8 -24
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/data-sources/connectors.d.mts +55 -0
- package/resources/data-sources/connectors.d.mts.map +1 -1
- package/resources/data-sources/connectors.d.ts +55 -0
- package/resources/data-sources/connectors.d.ts.map +1 -1
- package/resources/data-sources/connectors.js +55 -0
- package/resources/data-sources/connectors.js.map +1 -1
- package/resources/data-sources/connectors.mjs +55 -0
- package/resources/data-sources/connectors.mjs.map +1 -1
- package/resources/data-sources/data-sources.d.mts +59 -50
- package/resources/data-sources/data-sources.d.mts.map +1 -1
- package/resources/data-sources/data-sources.d.ts +59 -50
- package/resources/data-sources/data-sources.d.ts.map +1 -1
- package/resources/data-sources/data-sources.js +37 -0
- package/resources/data-sources/data-sources.js.map +1 -1
- package/resources/data-sources/data-sources.mjs +37 -0
- package/resources/data-sources/data-sources.mjs.map +1 -1
- package/resources/data-sources/index.d.mts +1 -1
- package/resources/data-sources/index.d.mts.map +1 -1
- package/resources/data-sources/index.d.ts +1 -1
- package/resources/data-sources/index.d.ts.map +1 -1
- package/resources/data-sources/index.js.map +1 -1
- package/resources/data-sources/index.mjs.map +1 -1
- package/resources/embeddings.d.mts +9 -0
- package/resources/embeddings.d.mts.map +1 -1
- package/resources/embeddings.d.ts +9 -0
- package/resources/embeddings.d.ts.map +1 -1
- package/resources/embeddings.js +9 -0
- package/resources/embeddings.js.map +1 -1
- package/resources/embeddings.mjs +9 -0
- package/resources/embeddings.mjs.map +1 -1
- package/resources/files/files.d.mts +47 -0
- package/resources/files/files.d.mts.map +1 -1
- package/resources/files/files.d.ts +47 -0
- package/resources/files/files.d.ts.map +1 -1
- package/resources/files/files.js +47 -0
- package/resources/files/files.js.map +1 -1
- package/resources/files/files.mjs +47 -0
- package/resources/files/files.mjs.map +1 -1
- package/resources/files/uploads.d.mts +36 -0
- package/resources/files/uploads.d.mts.map +1 -1
- package/resources/files/uploads.d.ts +36 -0
- package/resources/files/uploads.d.ts.map +1 -1
- package/resources/files/uploads.js +36 -0
- package/resources/files/uploads.js.map +1 -1
- package/resources/files/uploads.mjs +36 -0
- package/resources/files/uploads.mjs.map +1 -1
- package/resources/index.d.mts +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/parsing/index.d.mts +1 -1
- package/resources/parsing/index.d.mts.map +1 -1
- package/resources/parsing/index.d.ts +1 -1
- package/resources/parsing/index.d.ts.map +1 -1
- package/resources/parsing/index.js.map +1 -1
- package/resources/parsing/index.mjs.map +1 -1
- package/resources/parsing/jobs.d.mts +78 -85
- package/resources/parsing/jobs.d.mts.map +1 -1
- package/resources/parsing/jobs.d.ts +78 -85
- package/resources/parsing/jobs.d.ts.map +1 -1
- package/resources/parsing/jobs.js.map +1 -1
- package/resources/parsing/jobs.mjs.map +1 -1
- package/resources/parsing/parsing.d.mts +2 -2
- package/resources/parsing/parsing.d.mts.map +1 -1
- package/resources/parsing/parsing.d.ts +2 -2
- package/resources/parsing/parsing.d.ts.map +1 -1
- package/resources/parsing/parsing.js.map +1 -1
- package/resources/parsing/parsing.mjs.map +1 -1
- package/resources/stores/files.d.mts +155 -740
- package/resources/stores/files.d.mts.map +1 -1
- package/resources/stores/files.d.ts +155 -740
- package/resources/stores/files.d.ts.map +1 -1
- package/resources/stores/files.js +39 -12
- package/resources/stores/files.js.map +1 -1
- package/resources/stores/files.mjs +39 -12
- package/resources/stores/files.mjs.map +1 -1
- package/resources/stores/index.d.mts +2 -2
- package/resources/stores/index.d.mts.map +1 -1
- package/resources/stores/index.d.ts +2 -2
- package/resources/stores/index.d.ts.map +1 -1
- package/resources/stores/index.js.map +1 -1
- package/resources/stores/index.mjs.map +1 -1
- package/resources/stores/stores.d.mts +294 -532
- package/resources/stores/stores.d.mts.map +1 -1
- package/resources/stores/stores.d.ts +294 -532
- package/resources/stores/stores.d.ts.map +1 -1
- package/resources/stores/stores.js +56 -0
- package/resources/stores/stores.js.map +1 -1
- package/resources/stores/stores.mjs +56 -0
- package/resources/stores/stores.mjs.map +1 -1
- package/src/client.ts +72 -0
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/api-keys.ts +8 -29
- package/src/resources/data-sources/connectors.ts +55 -0
- package/src/resources/data-sources/data-sources.ts +63 -56
- package/src/resources/data-sources/index.ts +2 -0
- package/src/resources/embeddings.ts +9 -0
- package/src/resources/files/files.ts +47 -0
- package/src/resources/files/uploads.ts +36 -0
- package/src/resources/index.ts +19 -0
- package/src/resources/parsing/index.ts +4 -1
- package/src/resources/parsing/jobs.ts +96 -100
- package/src/resources/parsing/parsing.ts +7 -1
- package/src/resources/stores/files.ts +332 -1243
- package/src/resources/stores/index.ts +22 -4
- package/src/resources/stores/stores.ts +433 -851
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
2
|
import * as Shared from "../shared.mjs";
|
|
3
|
-
import * as ContentAPI from "../extractions/content.mjs";
|
|
4
3
|
import * as StoresAPI from "./stores.mjs";
|
|
5
4
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
6
5
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
@@ -14,6 +13,14 @@ export declare class Files extends APIResource {
|
|
|
14
13
|
* to add to the store.
|
|
15
14
|
*
|
|
16
15
|
* Returns: VectorStoreFile: The uploaded file details.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const storeFile = await client.stores.files.create(
|
|
20
|
+
* 'store_identifier',
|
|
21
|
+
* { file_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
17
24
|
*/
|
|
18
25
|
create(storeIdentifier: string, body: FileCreateParams, options?: RequestOptions): APIPromise<StoreFile>;
|
|
19
26
|
/**
|
|
@@ -23,6 +30,14 @@ export declare class Files extends APIResource {
|
|
|
23
30
|
* the file. options: Get file options.
|
|
24
31
|
*
|
|
25
32
|
* Returns: VectorStoreFile: The file details.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const storeFile = await client.stores.files.retrieve(
|
|
37
|
+
* 'file_identifier',
|
|
38
|
+
* { store_identifier: 'store_identifier' },
|
|
39
|
+
* );
|
|
40
|
+
* ```
|
|
26
41
|
*/
|
|
27
42
|
retrieve(fileIdentifier: string, params: FileRetrieveParams, options?: RequestOptions): APIPromise<StoreFile>;
|
|
28
43
|
/**
|
|
@@ -32,6 +47,14 @@ export declare class Files extends APIResource {
|
|
|
32
47
|
* name of the file to update. update_params: Metadata update payload.
|
|
33
48
|
*
|
|
34
49
|
* Returns: StoreFile: The updated file details.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* const storeFile = await client.stores.files.update(
|
|
54
|
+
* 'file_identifier',
|
|
55
|
+
* { store_identifier: 'store_identifier' },
|
|
56
|
+
* );
|
|
57
|
+
* ```
|
|
35
58
|
*/
|
|
36
59
|
update(fileIdentifier: string, params: FileUpdateParams, options?: RequestOptions): APIPromise<StoreFile>;
|
|
37
60
|
/**
|
|
@@ -41,6 +64,13 @@ export declare class Files extends APIResource {
|
|
|
41
64
|
* Pagination parameters and metadata filter
|
|
42
65
|
*
|
|
43
66
|
* Returns: VectorStoreFileListResponse: Paginated list of vector store files
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* const files = await client.stores.files.list(
|
|
71
|
+
* 'store_identifier',
|
|
72
|
+
* );
|
|
73
|
+
* ```
|
|
44
74
|
*/
|
|
45
75
|
list(storeIdentifier: string, body: FileListParams, options?: RequestOptions): APIPromise<FileListResponse>;
|
|
46
76
|
/**
|
|
@@ -50,18 +80,16 @@ export declare class Files extends APIResource {
|
|
|
50
80
|
* the file to delete.
|
|
51
81
|
*
|
|
52
82
|
* Returns: VectorStoreFileDeleted: The deleted file details.
|
|
53
|
-
*/
|
|
54
|
-
delete(fileIdentifier: string, params: FileDeleteParams, options?: RequestOptions): APIPromise<FileDeleteResponse>;
|
|
55
|
-
/**
|
|
56
|
-
* Search for files within a store based on semantic similarity.
|
|
57
83
|
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* const file = await client.stores.files.delete(
|
|
87
|
+
* 'file_identifier',
|
|
88
|
+
* { store_identifier: 'store_identifier' },
|
|
89
|
+
* );
|
|
90
|
+
* ```
|
|
63
91
|
*/
|
|
64
|
-
|
|
92
|
+
delete(fileIdentifier: string, params: FileDeleteParams, options?: RequestOptions): APIPromise<FileDeleteResponse>;
|
|
65
93
|
/**
|
|
66
94
|
* Poll for a file's processing status until it reaches a terminal state.
|
|
67
95
|
*
|
|
@@ -173,87 +201,74 @@ export interface FileUploadAndPollHelperParams {
|
|
|
173
201
|
returnChunks?: boolean | undefined;
|
|
174
202
|
multipartUpload?: MultipartUploadConfig | undefined;
|
|
175
203
|
}
|
|
176
|
-
|
|
177
|
-
* Represents a scored store file.
|
|
178
|
-
*/
|
|
179
|
-
export interface ScoredStoreFile {
|
|
204
|
+
export interface AudioURLInputChunk {
|
|
180
205
|
/**
|
|
181
|
-
*
|
|
206
|
+
* position of the chunk in a file
|
|
182
207
|
*/
|
|
183
|
-
|
|
208
|
+
chunk_index: number;
|
|
184
209
|
/**
|
|
185
|
-
*
|
|
210
|
+
* mime type of the chunk
|
|
186
211
|
*/
|
|
187
|
-
|
|
212
|
+
mime_type?: string;
|
|
188
213
|
/**
|
|
189
|
-
*
|
|
214
|
+
* metadata of the chunk
|
|
190
215
|
*/
|
|
191
|
-
|
|
216
|
+
generated_metadata?: StoresAPI.MarkdownChunkGeneratedMetadata | StoresAPI.TextChunkGeneratedMetadata | StoresAPI.PdfChunkGeneratedMetadata | StoresAPI.CodeChunkGeneratedMetadata | StoresAPI.AudioChunkGeneratedMetadata | StoresAPI.VideoChunkGeneratedMetadata | StoresAPI.ImageChunkGeneratedMetadata | null;
|
|
192
217
|
/**
|
|
193
|
-
*
|
|
218
|
+
* model used for this chunk
|
|
194
219
|
*/
|
|
195
|
-
|
|
220
|
+
model?: string | null;
|
|
196
221
|
/**
|
|
197
|
-
*
|
|
222
|
+
* Input type identifier
|
|
198
223
|
*/
|
|
199
|
-
|
|
224
|
+
type?: 'audio_url';
|
|
200
225
|
/**
|
|
201
|
-
*
|
|
226
|
+
* speech recognition (sr) text of the audio
|
|
202
227
|
*/
|
|
203
|
-
|
|
228
|
+
transcription?: string | null;
|
|
204
229
|
/**
|
|
205
|
-
*
|
|
230
|
+
* Model for audio URL validation.
|
|
206
231
|
*/
|
|
207
|
-
|
|
232
|
+
audio_url?: StoresAPI.AudioURL | null;
|
|
208
233
|
/**
|
|
209
|
-
*
|
|
234
|
+
* The sampling rate of the audio.
|
|
210
235
|
*/
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
*/
|
|
215
|
-
version?: number | null;
|
|
236
|
+
sampling_rate: number;
|
|
237
|
+
}
|
|
238
|
+
export interface ImageURLInputChunk {
|
|
216
239
|
/**
|
|
217
|
-
*
|
|
240
|
+
* position of the chunk in a file
|
|
218
241
|
*/
|
|
219
|
-
|
|
242
|
+
chunk_index: number;
|
|
220
243
|
/**
|
|
221
|
-
*
|
|
244
|
+
* mime type of the chunk
|
|
222
245
|
*/
|
|
223
|
-
|
|
246
|
+
mime_type?: string;
|
|
224
247
|
/**
|
|
225
|
-
*
|
|
248
|
+
* metadata of the chunk
|
|
226
249
|
*/
|
|
227
|
-
|
|
250
|
+
generated_metadata?: StoresAPI.MarkdownChunkGeneratedMetadata | StoresAPI.TextChunkGeneratedMetadata | StoresAPI.PdfChunkGeneratedMetadata | StoresAPI.CodeChunkGeneratedMetadata | StoresAPI.AudioChunkGeneratedMetadata | StoresAPI.VideoChunkGeneratedMetadata | StoresAPI.ImageChunkGeneratedMetadata | null;
|
|
228
251
|
/**
|
|
229
|
-
*
|
|
252
|
+
* model used for this chunk
|
|
230
253
|
*/
|
|
231
|
-
|
|
254
|
+
model?: string | null;
|
|
232
255
|
/**
|
|
233
|
-
*
|
|
256
|
+
* Input type identifier
|
|
234
257
|
*/
|
|
235
|
-
|
|
258
|
+
type?: 'image_url';
|
|
236
259
|
/**
|
|
237
|
-
*
|
|
260
|
+
* ocr text of the image
|
|
238
261
|
*/
|
|
239
|
-
|
|
262
|
+
ocr_text?: string | null;
|
|
240
263
|
/**
|
|
241
|
-
*
|
|
264
|
+
* summary of the image
|
|
242
265
|
*/
|
|
243
|
-
|
|
244
|
-
}
|
|
245
|
-
export declare namespace ScoredStoreFile {
|
|
266
|
+
summary?: string | null;
|
|
246
267
|
/**
|
|
247
|
-
*
|
|
268
|
+
* Model for image URL validation.
|
|
248
269
|
*/
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* Strategy for adding the file, this overrides the store-level default
|
|
252
|
-
*/
|
|
253
|
-
parsing_strategy?: 'fast' | 'high_quality';
|
|
254
|
-
}
|
|
270
|
+
image_url?: StoresAPI.ImageURLOutput | null;
|
|
255
271
|
}
|
|
256
|
-
export type StoreFileStatus = 'pending' | 'in_progress' | 'cancelled' | 'completed' | 'failed';
|
|
257
272
|
/**
|
|
258
273
|
* Represents a file stored in a store.
|
|
259
274
|
*/
|
|
@@ -305,7 +320,7 @@ export interface StoreFile {
|
|
|
305
320
|
/**
|
|
306
321
|
* Configuration for a file.
|
|
307
322
|
*/
|
|
308
|
-
config?:
|
|
323
|
+
config?: StoreFileConfig | null;
|
|
309
324
|
/**
|
|
310
325
|
* Type of the object
|
|
311
326
|
*/
|
|
@@ -313,553 +328,89 @@ export interface StoreFile {
|
|
|
313
328
|
/**
|
|
314
329
|
* chunks
|
|
315
330
|
*/
|
|
316
|
-
chunks?: Array<
|
|
331
|
+
chunks?: Array<TextInputChunk | ImageURLInputChunk | AudioURLInputChunk | VideoURLInputChunk> | null;
|
|
317
332
|
/**
|
|
318
333
|
* Presigned URL for file content
|
|
319
334
|
*/
|
|
320
335
|
content_url: string;
|
|
321
336
|
}
|
|
322
|
-
|
|
337
|
+
/**
|
|
338
|
+
* Configuration for a file.
|
|
339
|
+
*/
|
|
340
|
+
export interface StoreFileConfig {
|
|
323
341
|
/**
|
|
324
|
-
*
|
|
342
|
+
* Strategy for adding the file, this overrides the store-level default
|
|
325
343
|
*/
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
num_lines?: number;
|
|
397
|
-
file_extension?: string | null;
|
|
398
|
-
[k: string]: unknown;
|
|
399
|
-
}
|
|
400
|
-
interface PdfChunkGeneratedMetadata {
|
|
401
|
-
type?: 'pdf';
|
|
402
|
-
file_type?: 'application/pdf';
|
|
403
|
-
total_pages?: number | null;
|
|
404
|
-
total_size?: number | null;
|
|
405
|
-
file_extension?: string | null;
|
|
406
|
-
[k: string]: unknown;
|
|
407
|
-
}
|
|
408
|
-
interface CodeChunkGeneratedMetadata {
|
|
409
|
-
type?: 'code';
|
|
410
|
-
file_type: string;
|
|
411
|
-
language?: string | null;
|
|
412
|
-
word_count?: number | null;
|
|
413
|
-
file_size?: number | null;
|
|
414
|
-
start_line?: number;
|
|
415
|
-
num_lines?: number;
|
|
416
|
-
file_extension?: string | null;
|
|
417
|
-
[k: string]: unknown;
|
|
418
|
-
}
|
|
419
|
-
interface AudioChunkGeneratedMetadata {
|
|
420
|
-
type?: 'audio';
|
|
421
|
-
file_type?: string;
|
|
422
|
-
file_size?: number | null;
|
|
423
|
-
total_duration_seconds?: number | null;
|
|
424
|
-
sample_rate?: number | null;
|
|
425
|
-
channels?: number | null;
|
|
426
|
-
audio_format?: number | null;
|
|
427
|
-
bpm?: number | null;
|
|
428
|
-
file_extension?: string | null;
|
|
429
|
-
[k: string]: unknown;
|
|
430
|
-
}
|
|
431
|
-
interface VideoChunkGeneratedMetadata {
|
|
432
|
-
type?: 'video';
|
|
433
|
-
file_type?: string;
|
|
434
|
-
file_size?: number | null;
|
|
435
|
-
total_duration_seconds?: number | null;
|
|
436
|
-
fps?: number | null;
|
|
437
|
-
width?: number | null;
|
|
438
|
-
height?: number | null;
|
|
439
|
-
frame_count?: number | null;
|
|
440
|
-
has_audio_stream?: boolean;
|
|
441
|
-
bpm?: number | null;
|
|
442
|
-
file_extension?: string | null;
|
|
443
|
-
[k: string]: unknown;
|
|
444
|
-
}
|
|
445
|
-
interface ImageChunkGeneratedMetadata {
|
|
446
|
-
type?: 'image';
|
|
447
|
-
file_type?: string;
|
|
448
|
-
file_size?: number | null;
|
|
449
|
-
width?: number | null;
|
|
450
|
-
height?: number | null;
|
|
451
|
-
file_extension?: string | null;
|
|
452
|
-
[k: string]: unknown;
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
interface ImageURLInputChunk {
|
|
456
|
-
/**
|
|
457
|
-
* position of the chunk in a file
|
|
458
|
-
*/
|
|
459
|
-
chunk_index: number;
|
|
460
|
-
/**
|
|
461
|
-
* mime type of the chunk
|
|
462
|
-
*/
|
|
463
|
-
mime_type?: string;
|
|
464
|
-
/**
|
|
465
|
-
* metadata of the chunk
|
|
466
|
-
*/
|
|
467
|
-
generated_metadata?: ImageURLInputChunk.MarkdownChunkGeneratedMetadata | ImageURLInputChunk.TextChunkGeneratedMetadata | ImageURLInputChunk.PdfChunkGeneratedMetadata | ImageURLInputChunk.CodeChunkGeneratedMetadata | ImageURLInputChunk.AudioChunkGeneratedMetadata | ImageURLInputChunk.VideoChunkGeneratedMetadata | ImageURLInputChunk.ImageChunkGeneratedMetadata | null;
|
|
468
|
-
/**
|
|
469
|
-
* model used for this chunk
|
|
470
|
-
*/
|
|
471
|
-
model?: string | null;
|
|
472
|
-
/**
|
|
473
|
-
* Input type identifier
|
|
474
|
-
*/
|
|
475
|
-
type?: 'image_url';
|
|
476
|
-
/**
|
|
477
|
-
* ocr text of the image
|
|
478
|
-
*/
|
|
479
|
-
ocr_text?: string | null;
|
|
480
|
-
/**
|
|
481
|
-
* summary of the image
|
|
482
|
-
*/
|
|
483
|
-
summary?: string | null;
|
|
484
|
-
/**
|
|
485
|
-
* Model for image URL validation.
|
|
486
|
-
*/
|
|
487
|
-
image_url?: ImageURLInputChunk.ImageURL | null;
|
|
488
|
-
}
|
|
489
|
-
namespace ImageURLInputChunk {
|
|
490
|
-
interface MarkdownChunkGeneratedMetadata {
|
|
491
|
-
type?: 'markdown';
|
|
492
|
-
file_type?: 'text/markdown';
|
|
493
|
-
language?: string | null;
|
|
494
|
-
word_count?: number | null;
|
|
495
|
-
file_size?: number | null;
|
|
496
|
-
chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
|
|
497
|
-
heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
|
|
498
|
-
start_line?: number;
|
|
499
|
-
num_lines?: number;
|
|
500
|
-
file_extension?: string | null;
|
|
501
|
-
frontmatter?: {
|
|
502
|
-
[key: string]: unknown;
|
|
503
|
-
};
|
|
504
|
-
[k: string]: unknown;
|
|
505
|
-
}
|
|
506
|
-
namespace MarkdownChunkGeneratedMetadata {
|
|
507
|
-
interface ChunkHeading {
|
|
508
|
-
level: number;
|
|
509
|
-
text: string;
|
|
510
|
-
}
|
|
511
|
-
interface HeadingContext {
|
|
512
|
-
level: number;
|
|
513
|
-
text: string;
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
interface TextChunkGeneratedMetadata {
|
|
517
|
-
type?: 'text';
|
|
518
|
-
file_type?: 'text/plain';
|
|
519
|
-
language?: string | null;
|
|
520
|
-
word_count?: number | null;
|
|
521
|
-
file_size?: number | null;
|
|
522
|
-
start_line?: number;
|
|
523
|
-
num_lines?: number;
|
|
524
|
-
file_extension?: string | null;
|
|
525
|
-
[k: string]: unknown;
|
|
526
|
-
}
|
|
527
|
-
interface PdfChunkGeneratedMetadata {
|
|
528
|
-
type?: 'pdf';
|
|
529
|
-
file_type?: 'application/pdf';
|
|
530
|
-
total_pages?: number | null;
|
|
531
|
-
total_size?: number | null;
|
|
532
|
-
file_extension?: string | null;
|
|
533
|
-
[k: string]: unknown;
|
|
534
|
-
}
|
|
535
|
-
interface CodeChunkGeneratedMetadata {
|
|
536
|
-
type?: 'code';
|
|
537
|
-
file_type: string;
|
|
538
|
-
language?: string | null;
|
|
539
|
-
word_count?: number | null;
|
|
540
|
-
file_size?: number | null;
|
|
541
|
-
start_line?: number;
|
|
542
|
-
num_lines?: number;
|
|
543
|
-
file_extension?: string | null;
|
|
544
|
-
[k: string]: unknown;
|
|
545
|
-
}
|
|
546
|
-
interface AudioChunkGeneratedMetadata {
|
|
547
|
-
type?: 'audio';
|
|
548
|
-
file_type?: string;
|
|
549
|
-
file_size?: number | null;
|
|
550
|
-
total_duration_seconds?: number | null;
|
|
551
|
-
sample_rate?: number | null;
|
|
552
|
-
channels?: number | null;
|
|
553
|
-
audio_format?: number | null;
|
|
554
|
-
bpm?: number | null;
|
|
555
|
-
file_extension?: string | null;
|
|
556
|
-
[k: string]: unknown;
|
|
557
|
-
}
|
|
558
|
-
interface VideoChunkGeneratedMetadata {
|
|
559
|
-
type?: 'video';
|
|
560
|
-
file_type?: string;
|
|
561
|
-
file_size?: number | null;
|
|
562
|
-
total_duration_seconds?: number | null;
|
|
563
|
-
fps?: number | null;
|
|
564
|
-
width?: number | null;
|
|
565
|
-
height?: number | null;
|
|
566
|
-
frame_count?: number | null;
|
|
567
|
-
has_audio_stream?: boolean;
|
|
568
|
-
bpm?: number | null;
|
|
569
|
-
file_extension?: string | null;
|
|
570
|
-
[k: string]: unknown;
|
|
571
|
-
}
|
|
572
|
-
interface ImageChunkGeneratedMetadata {
|
|
573
|
-
type?: 'image';
|
|
574
|
-
file_type?: string;
|
|
575
|
-
file_size?: number | null;
|
|
576
|
-
width?: number | null;
|
|
577
|
-
height?: number | null;
|
|
578
|
-
file_extension?: string | null;
|
|
579
|
-
[k: string]: unknown;
|
|
580
|
-
}
|
|
581
|
-
/**
|
|
582
|
-
* Model for image URL validation.
|
|
583
|
-
*/
|
|
584
|
-
interface ImageURL {
|
|
585
|
-
/**
|
|
586
|
-
* The image URL. Can be either a URL or a Data URI.
|
|
587
|
-
*/
|
|
588
|
-
url: string;
|
|
589
|
-
/**
|
|
590
|
-
* The image format/mimetype
|
|
591
|
-
*/
|
|
592
|
-
format?: string;
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
interface AudioURLInputChunk {
|
|
596
|
-
/**
|
|
597
|
-
* position of the chunk in a file
|
|
598
|
-
*/
|
|
599
|
-
chunk_index: number;
|
|
600
|
-
/**
|
|
601
|
-
* mime type of the chunk
|
|
602
|
-
*/
|
|
603
|
-
mime_type?: string;
|
|
604
|
-
/**
|
|
605
|
-
* metadata of the chunk
|
|
606
|
-
*/
|
|
607
|
-
generated_metadata?: AudioURLInputChunk.MarkdownChunkGeneratedMetadata | AudioURLInputChunk.TextChunkGeneratedMetadata | AudioURLInputChunk.PdfChunkGeneratedMetadata | AudioURLInputChunk.CodeChunkGeneratedMetadata | AudioURLInputChunk.AudioChunkGeneratedMetadata | AudioURLInputChunk.VideoChunkGeneratedMetadata | AudioURLInputChunk.ImageChunkGeneratedMetadata | null;
|
|
608
|
-
/**
|
|
609
|
-
* model used for this chunk
|
|
610
|
-
*/
|
|
611
|
-
model?: string | null;
|
|
612
|
-
/**
|
|
613
|
-
* Input type identifier
|
|
614
|
-
*/
|
|
615
|
-
type?: 'audio_url';
|
|
616
|
-
/**
|
|
617
|
-
* speech recognition (sr) text of the audio
|
|
618
|
-
*/
|
|
619
|
-
transcription?: string | null;
|
|
620
|
-
/**
|
|
621
|
-
* Model for audio URL validation.
|
|
622
|
-
*/
|
|
623
|
-
audio_url?: AudioURLInputChunk.AudioURL | null;
|
|
624
|
-
/**
|
|
625
|
-
* The sampling rate of the audio.
|
|
626
|
-
*/
|
|
627
|
-
sampling_rate: number;
|
|
628
|
-
}
|
|
629
|
-
namespace AudioURLInputChunk {
|
|
630
|
-
interface MarkdownChunkGeneratedMetadata {
|
|
631
|
-
type?: 'markdown';
|
|
632
|
-
file_type?: 'text/markdown';
|
|
633
|
-
language?: string | null;
|
|
634
|
-
word_count?: number | null;
|
|
635
|
-
file_size?: number | null;
|
|
636
|
-
chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
|
|
637
|
-
heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
|
|
638
|
-
start_line?: number;
|
|
639
|
-
num_lines?: number;
|
|
640
|
-
file_extension?: string | null;
|
|
641
|
-
frontmatter?: {
|
|
642
|
-
[key: string]: unknown;
|
|
643
|
-
};
|
|
644
|
-
[k: string]: unknown;
|
|
645
|
-
}
|
|
646
|
-
namespace MarkdownChunkGeneratedMetadata {
|
|
647
|
-
interface ChunkHeading {
|
|
648
|
-
level: number;
|
|
649
|
-
text: string;
|
|
650
|
-
}
|
|
651
|
-
interface HeadingContext {
|
|
652
|
-
level: number;
|
|
653
|
-
text: string;
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
interface TextChunkGeneratedMetadata {
|
|
657
|
-
type?: 'text';
|
|
658
|
-
file_type?: 'text/plain';
|
|
659
|
-
language?: string | null;
|
|
660
|
-
word_count?: number | null;
|
|
661
|
-
file_size?: number | null;
|
|
662
|
-
start_line?: number;
|
|
663
|
-
num_lines?: number;
|
|
664
|
-
file_extension?: string | null;
|
|
665
|
-
[k: string]: unknown;
|
|
666
|
-
}
|
|
667
|
-
interface PdfChunkGeneratedMetadata {
|
|
668
|
-
type?: 'pdf';
|
|
669
|
-
file_type?: 'application/pdf';
|
|
670
|
-
total_pages?: number | null;
|
|
671
|
-
total_size?: number | null;
|
|
672
|
-
file_extension?: string | null;
|
|
673
|
-
[k: string]: unknown;
|
|
674
|
-
}
|
|
675
|
-
interface CodeChunkGeneratedMetadata {
|
|
676
|
-
type?: 'code';
|
|
677
|
-
file_type: string;
|
|
678
|
-
language?: string | null;
|
|
679
|
-
word_count?: number | null;
|
|
680
|
-
file_size?: number | null;
|
|
681
|
-
start_line?: number;
|
|
682
|
-
num_lines?: number;
|
|
683
|
-
file_extension?: string | null;
|
|
684
|
-
[k: string]: unknown;
|
|
685
|
-
}
|
|
686
|
-
interface AudioChunkGeneratedMetadata {
|
|
687
|
-
type?: 'audio';
|
|
688
|
-
file_type?: string;
|
|
689
|
-
file_size?: number | null;
|
|
690
|
-
total_duration_seconds?: number | null;
|
|
691
|
-
sample_rate?: number | null;
|
|
692
|
-
channels?: number | null;
|
|
693
|
-
audio_format?: number | null;
|
|
694
|
-
bpm?: number | null;
|
|
695
|
-
file_extension?: string | null;
|
|
696
|
-
[k: string]: unknown;
|
|
697
|
-
}
|
|
698
|
-
interface VideoChunkGeneratedMetadata {
|
|
699
|
-
type?: 'video';
|
|
700
|
-
file_type?: string;
|
|
701
|
-
file_size?: number | null;
|
|
702
|
-
total_duration_seconds?: number | null;
|
|
703
|
-
fps?: number | null;
|
|
704
|
-
width?: number | null;
|
|
705
|
-
height?: number | null;
|
|
706
|
-
frame_count?: number | null;
|
|
707
|
-
has_audio_stream?: boolean;
|
|
708
|
-
bpm?: number | null;
|
|
709
|
-
file_extension?: string | null;
|
|
710
|
-
[k: string]: unknown;
|
|
711
|
-
}
|
|
712
|
-
interface ImageChunkGeneratedMetadata {
|
|
713
|
-
type?: 'image';
|
|
714
|
-
file_type?: string;
|
|
715
|
-
file_size?: number | null;
|
|
716
|
-
width?: number | null;
|
|
717
|
-
height?: number | null;
|
|
718
|
-
file_extension?: string | null;
|
|
719
|
-
[k: string]: unknown;
|
|
720
|
-
}
|
|
721
|
-
/**
|
|
722
|
-
* Model for audio URL validation.
|
|
723
|
-
*/
|
|
724
|
-
interface AudioURL {
|
|
725
|
-
/**
|
|
726
|
-
* The audio URL. Can be either a URL or a Data URI.
|
|
727
|
-
*/
|
|
728
|
-
url: string;
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
interface VideoURLInputChunk {
|
|
732
|
-
/**
|
|
733
|
-
* position of the chunk in a file
|
|
734
|
-
*/
|
|
735
|
-
chunk_index: number;
|
|
736
|
-
/**
|
|
737
|
-
* mime type of the chunk
|
|
738
|
-
*/
|
|
739
|
-
mime_type?: string;
|
|
740
|
-
/**
|
|
741
|
-
* metadata of the chunk
|
|
742
|
-
*/
|
|
743
|
-
generated_metadata?: VideoURLInputChunk.MarkdownChunkGeneratedMetadata | VideoURLInputChunk.TextChunkGeneratedMetadata | VideoURLInputChunk.PdfChunkGeneratedMetadata | VideoURLInputChunk.CodeChunkGeneratedMetadata | VideoURLInputChunk.AudioChunkGeneratedMetadata | VideoURLInputChunk.VideoChunkGeneratedMetadata | VideoURLInputChunk.ImageChunkGeneratedMetadata | null;
|
|
744
|
-
/**
|
|
745
|
-
* model used for this chunk
|
|
746
|
-
*/
|
|
747
|
-
model?: string | null;
|
|
748
|
-
/**
|
|
749
|
-
* Input type identifier
|
|
750
|
-
*/
|
|
751
|
-
type?: 'video_url';
|
|
752
|
-
/**
|
|
753
|
-
* speech recognition (sr) text of the video
|
|
754
|
-
*/
|
|
755
|
-
transcription?: string | null;
|
|
756
|
-
/**
|
|
757
|
-
* Model for video URL validation.
|
|
758
|
-
*/
|
|
759
|
-
video_url?: VideoURLInputChunk.VideoURL | null;
|
|
760
|
-
}
|
|
761
|
-
namespace VideoURLInputChunk {
|
|
762
|
-
interface MarkdownChunkGeneratedMetadata {
|
|
763
|
-
type?: 'markdown';
|
|
764
|
-
file_type?: 'text/markdown';
|
|
765
|
-
language?: string | null;
|
|
766
|
-
word_count?: number | null;
|
|
767
|
-
file_size?: number | null;
|
|
768
|
-
chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
|
|
769
|
-
heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
|
|
770
|
-
start_line?: number;
|
|
771
|
-
num_lines?: number;
|
|
772
|
-
file_extension?: string | null;
|
|
773
|
-
frontmatter?: {
|
|
774
|
-
[key: string]: unknown;
|
|
775
|
-
};
|
|
776
|
-
[k: string]: unknown;
|
|
777
|
-
}
|
|
778
|
-
namespace MarkdownChunkGeneratedMetadata {
|
|
779
|
-
interface ChunkHeading {
|
|
780
|
-
level: number;
|
|
781
|
-
text: string;
|
|
782
|
-
}
|
|
783
|
-
interface HeadingContext {
|
|
784
|
-
level: number;
|
|
785
|
-
text: string;
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
interface TextChunkGeneratedMetadata {
|
|
789
|
-
type?: 'text';
|
|
790
|
-
file_type?: 'text/plain';
|
|
791
|
-
language?: string | null;
|
|
792
|
-
word_count?: number | null;
|
|
793
|
-
file_size?: number | null;
|
|
794
|
-
start_line?: number;
|
|
795
|
-
num_lines?: number;
|
|
796
|
-
file_extension?: string | null;
|
|
797
|
-
[k: string]: unknown;
|
|
798
|
-
}
|
|
799
|
-
interface PdfChunkGeneratedMetadata {
|
|
800
|
-
type?: 'pdf';
|
|
801
|
-
file_type?: 'application/pdf';
|
|
802
|
-
total_pages?: number | null;
|
|
803
|
-
total_size?: number | null;
|
|
804
|
-
file_extension?: string | null;
|
|
805
|
-
[k: string]: unknown;
|
|
806
|
-
}
|
|
807
|
-
interface CodeChunkGeneratedMetadata {
|
|
808
|
-
type?: 'code';
|
|
809
|
-
file_type: string;
|
|
810
|
-
language?: string | null;
|
|
811
|
-
word_count?: number | null;
|
|
812
|
-
file_size?: number | null;
|
|
813
|
-
start_line?: number;
|
|
814
|
-
num_lines?: number;
|
|
815
|
-
file_extension?: string | null;
|
|
816
|
-
[k: string]: unknown;
|
|
817
|
-
}
|
|
818
|
-
interface AudioChunkGeneratedMetadata {
|
|
819
|
-
type?: 'audio';
|
|
820
|
-
file_type?: string;
|
|
821
|
-
file_size?: number | null;
|
|
822
|
-
total_duration_seconds?: number | null;
|
|
823
|
-
sample_rate?: number | null;
|
|
824
|
-
channels?: number | null;
|
|
825
|
-
audio_format?: number | null;
|
|
826
|
-
bpm?: number | null;
|
|
827
|
-
file_extension?: string | null;
|
|
828
|
-
[k: string]: unknown;
|
|
829
|
-
}
|
|
830
|
-
interface VideoChunkGeneratedMetadata {
|
|
831
|
-
type?: 'video';
|
|
832
|
-
file_type?: string;
|
|
833
|
-
file_size?: number | null;
|
|
834
|
-
total_duration_seconds?: number | null;
|
|
835
|
-
fps?: number | null;
|
|
836
|
-
width?: number | null;
|
|
837
|
-
height?: number | null;
|
|
838
|
-
frame_count?: number | null;
|
|
839
|
-
has_audio_stream?: boolean;
|
|
840
|
-
bpm?: number | null;
|
|
841
|
-
file_extension?: string | null;
|
|
842
|
-
[k: string]: unknown;
|
|
843
|
-
}
|
|
844
|
-
interface ImageChunkGeneratedMetadata {
|
|
845
|
-
type?: 'image';
|
|
846
|
-
file_type?: string;
|
|
847
|
-
file_size?: number | null;
|
|
848
|
-
width?: number | null;
|
|
849
|
-
height?: number | null;
|
|
850
|
-
file_extension?: string | null;
|
|
851
|
-
[k: string]: unknown;
|
|
852
|
-
}
|
|
853
|
-
/**
|
|
854
|
-
* Model for video URL validation.
|
|
855
|
-
*/
|
|
856
|
-
interface VideoURL {
|
|
857
|
-
/**
|
|
858
|
-
* The video URL. Can be either a URL or a Data URI.
|
|
859
|
-
*/
|
|
860
|
-
url: string;
|
|
861
|
-
}
|
|
862
|
-
}
|
|
344
|
+
parsing_strategy?: 'fast' | 'high_quality';
|
|
345
|
+
}
|
|
346
|
+
export type StoreFileStatus = 'pending' | 'in_progress' | 'cancelled' | 'completed' | 'failed';
|
|
347
|
+
export interface TextInputChunk {
|
|
348
|
+
/**
|
|
349
|
+
* position of the chunk in a file
|
|
350
|
+
*/
|
|
351
|
+
chunk_index: number;
|
|
352
|
+
/**
|
|
353
|
+
* mime type of the chunk
|
|
354
|
+
*/
|
|
355
|
+
mime_type?: string;
|
|
356
|
+
/**
|
|
357
|
+
* metadata of the chunk
|
|
358
|
+
*/
|
|
359
|
+
generated_metadata?: StoresAPI.MarkdownChunkGeneratedMetadata | StoresAPI.TextChunkGeneratedMetadata | StoresAPI.PdfChunkGeneratedMetadata | StoresAPI.CodeChunkGeneratedMetadata | StoresAPI.AudioChunkGeneratedMetadata | StoresAPI.VideoChunkGeneratedMetadata | StoresAPI.ImageChunkGeneratedMetadata | null;
|
|
360
|
+
/**
|
|
361
|
+
* model used for this chunk
|
|
362
|
+
*/
|
|
363
|
+
model?: string | null;
|
|
364
|
+
/**
|
|
365
|
+
* Input type identifier
|
|
366
|
+
*/
|
|
367
|
+
type?: 'text';
|
|
368
|
+
/**
|
|
369
|
+
* The offset of the text in the file relative to the start of the file.
|
|
370
|
+
*/
|
|
371
|
+
offset?: number;
|
|
372
|
+
/**
|
|
373
|
+
* Text content
|
|
374
|
+
*/
|
|
375
|
+
text?: string | null;
|
|
376
|
+
/**
|
|
377
|
+
* LLM-generated context that situates this chunk within its source document
|
|
378
|
+
*/
|
|
379
|
+
context?: string | null;
|
|
380
|
+
}
|
|
381
|
+
export interface VideoURLInputChunk {
|
|
382
|
+
/**
|
|
383
|
+
* position of the chunk in a file
|
|
384
|
+
*/
|
|
385
|
+
chunk_index: number;
|
|
386
|
+
/**
|
|
387
|
+
* mime type of the chunk
|
|
388
|
+
*/
|
|
389
|
+
mime_type?: string;
|
|
390
|
+
/**
|
|
391
|
+
* metadata of the chunk
|
|
392
|
+
*/
|
|
393
|
+
generated_metadata?: StoresAPI.MarkdownChunkGeneratedMetadata | StoresAPI.TextChunkGeneratedMetadata | StoresAPI.PdfChunkGeneratedMetadata | StoresAPI.CodeChunkGeneratedMetadata | StoresAPI.AudioChunkGeneratedMetadata | StoresAPI.VideoChunkGeneratedMetadata | StoresAPI.ImageChunkGeneratedMetadata | null;
|
|
394
|
+
/**
|
|
395
|
+
* model used for this chunk
|
|
396
|
+
*/
|
|
397
|
+
model?: string | null;
|
|
398
|
+
/**
|
|
399
|
+
* Input type identifier
|
|
400
|
+
*/
|
|
401
|
+
type?: 'video_url';
|
|
402
|
+
/**
|
|
403
|
+
* speech recognition (sr) text of the video
|
|
404
|
+
*/
|
|
405
|
+
transcription?: string | null;
|
|
406
|
+
/**
|
|
407
|
+
* summary of the video
|
|
408
|
+
*/
|
|
409
|
+
summary?: string | null;
|
|
410
|
+
/**
|
|
411
|
+
* Model for video URL validation.
|
|
412
|
+
*/
|
|
413
|
+
video_url?: StoresAPI.VideoURL | null;
|
|
863
414
|
}
|
|
864
415
|
export interface FileListResponse {
|
|
865
416
|
/**
|
|
@@ -920,16 +471,6 @@ export interface FileDeleteResponse {
|
|
|
920
471
|
*/
|
|
921
472
|
object?: 'store.file';
|
|
922
473
|
}
|
|
923
|
-
export interface FileSearchResponse {
|
|
924
|
-
/**
|
|
925
|
-
* The object type of the response
|
|
926
|
-
*/
|
|
927
|
-
object?: 'list';
|
|
928
|
-
/**
|
|
929
|
-
* The list of scored store files
|
|
930
|
-
*/
|
|
931
|
-
data: Array<ScoredStoreFile>;
|
|
932
|
-
}
|
|
933
474
|
export interface FileCreateParams {
|
|
934
475
|
/**
|
|
935
476
|
* Optional metadata for the file
|
|
@@ -938,7 +479,7 @@ export interface FileCreateParams {
|
|
|
938
479
|
/**
|
|
939
480
|
* Configuration for adding the file
|
|
940
481
|
*/
|
|
941
|
-
config?:
|
|
482
|
+
config?: StoreFileConfig;
|
|
942
483
|
/**
|
|
943
484
|
* External identifier for this file in the store
|
|
944
485
|
*/
|
|
@@ -952,29 +493,9 @@ export interface FileCreateParams {
|
|
|
952
493
|
*/
|
|
953
494
|
file_id: string;
|
|
954
495
|
/**
|
|
955
|
-
*
|
|
956
|
-
*/
|
|
957
|
-
experimental?: FileCreateParams.Experimental | null;
|
|
958
|
-
}
|
|
959
|
-
export declare namespace FileCreateParams {
|
|
960
|
-
/**
|
|
961
|
-
* Configuration for adding the file
|
|
962
|
-
*/
|
|
963
|
-
interface Config {
|
|
964
|
-
/**
|
|
965
|
-
* Strategy for adding the file, this overrides the store-level default
|
|
966
|
-
*/
|
|
967
|
-
parsing_strategy?: 'fast' | 'high_quality';
|
|
968
|
-
}
|
|
969
|
-
/**
|
|
970
|
-
* @deprecated Configuration for a file.
|
|
496
|
+
* Configuration for a file.
|
|
971
497
|
*/
|
|
972
|
-
|
|
973
|
-
/**
|
|
974
|
-
* Strategy for adding the file, this overrides the store-level default
|
|
975
|
-
*/
|
|
976
|
-
parsing_strategy?: 'fast' | 'high_quality';
|
|
977
|
-
}
|
|
498
|
+
experimental?: StoreFileConfig | null;
|
|
978
499
|
}
|
|
979
500
|
export interface FileRetrieveParams {
|
|
980
501
|
/**
|
|
@@ -1037,113 +558,7 @@ export interface FileDeleteParams {
|
|
|
1037
558
|
*/
|
|
1038
559
|
store_identifier: string;
|
|
1039
560
|
}
|
|
1040
|
-
export interface FileSearchParams {
|
|
1041
|
-
/**
|
|
1042
|
-
* Search query text
|
|
1043
|
-
*/
|
|
1044
|
-
query: string | ContentAPI.ImageURLInput | ContentAPI.TextInput;
|
|
1045
|
-
/**
|
|
1046
|
-
* IDs or names of stores to search
|
|
1047
|
-
*/
|
|
1048
|
-
store_identifiers: Array<string>;
|
|
1049
|
-
/**
|
|
1050
|
-
* Number of results to return
|
|
1051
|
-
*/
|
|
1052
|
-
top_k?: number;
|
|
1053
|
-
/**
|
|
1054
|
-
* Optional filter conditions
|
|
1055
|
-
*/
|
|
1056
|
-
filters?: Shared.SearchFilter | Shared.SearchFilterCondition | Array<Shared.SearchFilter | Shared.SearchFilterCondition> | null;
|
|
1057
|
-
/**
|
|
1058
|
-
* Optional list of file IDs to filter chunks by (inclusion filter)
|
|
1059
|
-
*/
|
|
1060
|
-
file_ids?: Array<unknown> | Array<string> | null;
|
|
1061
|
-
/**
|
|
1062
|
-
* Search configuration options
|
|
1063
|
-
*/
|
|
1064
|
-
search_options?: FileSearchParams.SearchOptions;
|
|
1065
|
-
}
|
|
1066
|
-
export declare namespace FileSearchParams {
|
|
1067
|
-
/**
|
|
1068
|
-
* Search configuration options
|
|
1069
|
-
*/
|
|
1070
|
-
interface SearchOptions {
|
|
1071
|
-
/**
|
|
1072
|
-
* Minimum similarity score threshold
|
|
1073
|
-
*/
|
|
1074
|
-
score_threshold?: number;
|
|
1075
|
-
/**
|
|
1076
|
-
* Whether to rewrite the query. Ignored when agentic is enabled (the agent handles
|
|
1077
|
-
* query decomposition).
|
|
1078
|
-
*/
|
|
1079
|
-
rewrite_query?: boolean;
|
|
1080
|
-
/**
|
|
1081
|
-
* Whether to rerank results and optional reranking configuration. Ignored when
|
|
1082
|
-
* agentic is enabled (the agent handles ranking).
|
|
1083
|
-
*/
|
|
1084
|
-
rerank?: boolean | SearchOptions.RerankConfig | null;
|
|
1085
|
-
/**
|
|
1086
|
-
* Whether to use agentic multi-query search with automatic query decomposition and
|
|
1087
|
-
* ranking. When enabled, rewrite_query and rerank options are ignored.
|
|
1088
|
-
*/
|
|
1089
|
-
agentic?: boolean | SearchOptions.AgenticSearchConfig | null;
|
|
1090
|
-
/**
|
|
1091
|
-
* Whether to return file metadata
|
|
1092
|
-
*/
|
|
1093
|
-
return_metadata?: boolean;
|
|
1094
|
-
/**
|
|
1095
|
-
* Whether to return matching text chunks
|
|
1096
|
-
*/
|
|
1097
|
-
return_chunks?: boolean;
|
|
1098
|
-
/**
|
|
1099
|
-
* Number of chunks to return for each file
|
|
1100
|
-
*/
|
|
1101
|
-
chunks_per_file?: number;
|
|
1102
|
-
/**
|
|
1103
|
-
* Whether to apply search rules
|
|
1104
|
-
*/
|
|
1105
|
-
apply_search_rules?: boolean;
|
|
1106
|
-
}
|
|
1107
|
-
namespace SearchOptions {
|
|
1108
|
-
/**
|
|
1109
|
-
* Represents a reranking configuration.
|
|
1110
|
-
*/
|
|
1111
|
-
interface RerankConfig {
|
|
1112
|
-
/**
|
|
1113
|
-
* The name of the reranking model
|
|
1114
|
-
*/
|
|
1115
|
-
model?: string;
|
|
1116
|
-
/**
|
|
1117
|
-
* Whether to include metadata in the reranked results
|
|
1118
|
-
*/
|
|
1119
|
-
with_metadata?: boolean | Array<string>;
|
|
1120
|
-
/**
|
|
1121
|
-
* Maximum number of results to return after reranking. If None, returns all
|
|
1122
|
-
* reranked results.
|
|
1123
|
-
*/
|
|
1124
|
-
top_k?: number | null;
|
|
1125
|
-
}
|
|
1126
|
-
/**
|
|
1127
|
-
* Configuration for agentic multi-query search.
|
|
1128
|
-
*/
|
|
1129
|
-
interface AgenticSearchConfig {
|
|
1130
|
-
/**
|
|
1131
|
-
* Maximum number of search rounds
|
|
1132
|
-
*/
|
|
1133
|
-
max_rounds?: number;
|
|
1134
|
-
/**
|
|
1135
|
-
* Maximum queries per round
|
|
1136
|
-
*/
|
|
1137
|
-
queries_per_round?: number;
|
|
1138
|
-
/**
|
|
1139
|
-
* Additional custom instructions (followed only when not in conflict with existing
|
|
1140
|
-
* rules)
|
|
1141
|
-
*/
|
|
1142
|
-
instructions?: string | null;
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
561
|
export declare namespace Files {
|
|
1147
|
-
export { type
|
|
562
|
+
export { type AudioURLInputChunk as AudioURLInputChunk, type ImageURLInputChunk as ImageURLInputChunk, type StoreFile as StoreFile, type StoreFileConfig as StoreFileConfig, type StoreFileStatus as StoreFileStatus, type TextInputChunk as TextInputChunk, type VideoURLInputChunk as VideoURLInputChunk, type FileListResponse as FileListResponse, type FileDeleteResponse as FileDeleteResponse, type FileCreateParams as FileCreateParams, type FileRetrieveParams as FileRetrieveParams, type FileUpdateParams as FileUpdateParams, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, };
|
|
1148
563
|
}
|
|
1149
564
|
//# sourceMappingURL=files.d.mts.map
|