@mixedbread/sdk 0.60.0 → 0.62.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 +56 -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 +22 -0
- package/client.js.map +1 -1
- package/client.mjs +22 -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 +159 -744
- package/resources/stores/files.d.mts.map +1 -1
- package/resources/stores/files.d.ts +159 -744
- 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 +292 -538
- package/resources/stores/stores.d.mts.map +1 -1
- package/resources/stores/stores.d.ts +292 -538
- 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 +60 -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 +343 -1254
- package/src/resources/stores/index.ts +22 -4
- package/src/resources/stores/stores.ts +429 -857
- 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,83 +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
|
-
|
|
236
|
+
sampling_rate: number;
|
|
237
|
+
}
|
|
238
|
+
export interface ImageURLInputChunk {
|
|
212
239
|
/**
|
|
213
|
-
*
|
|
240
|
+
* position of the chunk in a file
|
|
214
241
|
*/
|
|
215
|
-
|
|
242
|
+
chunk_index: number;
|
|
216
243
|
/**
|
|
217
|
-
*
|
|
244
|
+
* mime type of the chunk
|
|
218
245
|
*/
|
|
219
|
-
|
|
246
|
+
mime_type?: string;
|
|
220
247
|
/**
|
|
221
|
-
*
|
|
248
|
+
* metadata of the chunk
|
|
222
249
|
*/
|
|
223
|
-
|
|
250
|
+
generated_metadata?: StoresAPI.MarkdownChunkGeneratedMetadata | StoresAPI.TextChunkGeneratedMetadata | StoresAPI.PdfChunkGeneratedMetadata | StoresAPI.CodeChunkGeneratedMetadata | StoresAPI.AudioChunkGeneratedMetadata | StoresAPI.VideoChunkGeneratedMetadata | StoresAPI.ImageChunkGeneratedMetadata | null;
|
|
224
251
|
/**
|
|
225
|
-
*
|
|
252
|
+
* model used for this chunk
|
|
226
253
|
*/
|
|
227
|
-
|
|
254
|
+
model?: string | null;
|
|
228
255
|
/**
|
|
229
|
-
*
|
|
256
|
+
* Input type identifier
|
|
230
257
|
*/
|
|
231
|
-
|
|
258
|
+
type?: 'image_url';
|
|
232
259
|
/**
|
|
233
|
-
*
|
|
260
|
+
* ocr text of the image
|
|
234
261
|
*/
|
|
235
|
-
|
|
262
|
+
ocr_text?: string | null;
|
|
236
263
|
/**
|
|
237
|
-
*
|
|
264
|
+
* summary of the image
|
|
238
265
|
*/
|
|
239
|
-
|
|
240
|
-
}
|
|
241
|
-
export declare namespace ScoredStoreFile {
|
|
266
|
+
summary?: string | null;
|
|
242
267
|
/**
|
|
243
|
-
*
|
|
268
|
+
* Model for image URL validation.
|
|
244
269
|
*/
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* Strategy for adding the file, this overrides the store-level default
|
|
248
|
-
*/
|
|
249
|
-
parsing_strategy?: 'fast' | 'high_quality';
|
|
250
|
-
}
|
|
270
|
+
image_url?: StoresAPI.ImageURLOutput | null;
|
|
251
271
|
}
|
|
252
|
-
export type StoreFileStatus = 'pending' | 'in_progress' | 'cancelled' | 'completed' | 'failed';
|
|
253
272
|
/**
|
|
254
273
|
* Represents a file stored in a store.
|
|
255
274
|
*/
|
|
@@ -301,7 +320,7 @@ export interface StoreFile {
|
|
|
301
320
|
/**
|
|
302
321
|
* Configuration for a file.
|
|
303
322
|
*/
|
|
304
|
-
config?:
|
|
323
|
+
config?: StoreFileConfig | null;
|
|
305
324
|
/**
|
|
306
325
|
* Type of the object
|
|
307
326
|
*/
|
|
@@ -309,557 +328,89 @@ export interface StoreFile {
|
|
|
309
328
|
/**
|
|
310
329
|
* chunks
|
|
311
330
|
*/
|
|
312
|
-
chunks?: Array<
|
|
331
|
+
chunks?: Array<TextInputChunk | ImageURLInputChunk | AudioURLInputChunk | VideoURLInputChunk> | null;
|
|
332
|
+
/**
|
|
333
|
+
* Presigned URL for file content
|
|
334
|
+
*/
|
|
335
|
+
content_url: string;
|
|
313
336
|
}
|
|
314
|
-
|
|
337
|
+
/**
|
|
338
|
+
* Configuration for a file.
|
|
339
|
+
*/
|
|
340
|
+
export interface StoreFileConfig {
|
|
315
341
|
/**
|
|
316
|
-
*
|
|
342
|
+
* Strategy for adding the file, this overrides the store-level default
|
|
317
343
|
*/
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
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
|
-
num_lines?: number;
|
|
389
|
-
file_extension?: string | null;
|
|
390
|
-
[k: string]: unknown;
|
|
391
|
-
}
|
|
392
|
-
interface PdfChunkGeneratedMetadata {
|
|
393
|
-
type?: 'pdf';
|
|
394
|
-
file_type?: 'application/pdf';
|
|
395
|
-
total_pages?: number | null;
|
|
396
|
-
total_size?: number | null;
|
|
397
|
-
file_extension?: string | null;
|
|
398
|
-
[k: string]: unknown;
|
|
399
|
-
}
|
|
400
|
-
interface CodeChunkGeneratedMetadata {
|
|
401
|
-
type?: 'code';
|
|
402
|
-
file_type: string;
|
|
403
|
-
language?: string | null;
|
|
404
|
-
word_count?: number | null;
|
|
405
|
-
file_size?: number | null;
|
|
406
|
-
start_line?: number;
|
|
407
|
-
num_lines?: number;
|
|
408
|
-
file_extension?: string | null;
|
|
409
|
-
[k: string]: unknown;
|
|
410
|
-
}
|
|
411
|
-
interface AudioChunkGeneratedMetadata {
|
|
412
|
-
type?: 'audio';
|
|
413
|
-
file_type?: string;
|
|
414
|
-
file_size?: number | null;
|
|
415
|
-
total_duration_seconds?: number | null;
|
|
416
|
-
sample_rate?: number | null;
|
|
417
|
-
channels?: number | null;
|
|
418
|
-
audio_format?: number | null;
|
|
419
|
-
bpm?: number | null;
|
|
420
|
-
file_extension?: string | null;
|
|
421
|
-
[k: string]: unknown;
|
|
422
|
-
}
|
|
423
|
-
interface VideoChunkGeneratedMetadata {
|
|
424
|
-
type?: 'video';
|
|
425
|
-
file_type?: string;
|
|
426
|
-
file_size?: number | null;
|
|
427
|
-
total_duration_seconds?: number | null;
|
|
428
|
-
fps?: number | null;
|
|
429
|
-
width?: number | null;
|
|
430
|
-
height?: number | null;
|
|
431
|
-
frame_count?: number | null;
|
|
432
|
-
has_audio_stream?: boolean;
|
|
433
|
-
bpm?: number | null;
|
|
434
|
-
file_extension?: string | null;
|
|
435
|
-
[k: string]: unknown;
|
|
436
|
-
}
|
|
437
|
-
interface ImageChunkGeneratedMetadata {
|
|
438
|
-
type?: 'image';
|
|
439
|
-
file_type?: string;
|
|
440
|
-
file_size?: number | null;
|
|
441
|
-
width?: number | null;
|
|
442
|
-
height?: number | null;
|
|
443
|
-
file_extension?: string | null;
|
|
444
|
-
[k: string]: unknown;
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
interface ImageURLInputChunk {
|
|
448
|
-
/**
|
|
449
|
-
* position of the chunk in a file
|
|
450
|
-
*/
|
|
451
|
-
chunk_index: number;
|
|
452
|
-
/**
|
|
453
|
-
* mime type of the chunk
|
|
454
|
-
*/
|
|
455
|
-
mime_type?: string;
|
|
456
|
-
/**
|
|
457
|
-
* metadata of the chunk
|
|
458
|
-
*/
|
|
459
|
-
generated_metadata?: ImageURLInputChunk.MarkdownChunkGeneratedMetadata | ImageURLInputChunk.TextChunkGeneratedMetadata | ImageURLInputChunk.PdfChunkGeneratedMetadata | ImageURLInputChunk.CodeChunkGeneratedMetadata | ImageURLInputChunk.AudioChunkGeneratedMetadata | ImageURLInputChunk.VideoChunkGeneratedMetadata | ImageURLInputChunk.ImageChunkGeneratedMetadata | null;
|
|
460
|
-
/**
|
|
461
|
-
* model used for this chunk
|
|
462
|
-
*/
|
|
463
|
-
model?: string | null;
|
|
464
|
-
/**
|
|
465
|
-
* Input type identifier
|
|
466
|
-
*/
|
|
467
|
-
type?: 'image_url';
|
|
468
|
-
/**
|
|
469
|
-
* ocr text of the image
|
|
470
|
-
*/
|
|
471
|
-
ocr_text?: string | null;
|
|
472
|
-
/**
|
|
473
|
-
* summary of the image
|
|
474
|
-
*/
|
|
475
|
-
summary?: string | null;
|
|
476
|
-
/**
|
|
477
|
-
* Model for image URL validation.
|
|
478
|
-
*/
|
|
479
|
-
image_url?: ImageURLInputChunk.ImageURL | null;
|
|
480
|
-
}
|
|
481
|
-
namespace ImageURLInputChunk {
|
|
482
|
-
interface MarkdownChunkGeneratedMetadata {
|
|
483
|
-
type?: 'markdown';
|
|
484
|
-
file_type?: 'text/markdown';
|
|
485
|
-
language?: string | null;
|
|
486
|
-
word_count?: number | null;
|
|
487
|
-
file_size?: number | null;
|
|
488
|
-
chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
|
|
489
|
-
heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
|
|
490
|
-
start_line?: number;
|
|
491
|
-
num_lines?: number;
|
|
492
|
-
file_extension?: string | null;
|
|
493
|
-
frontmatter?: {
|
|
494
|
-
[key: string]: unknown;
|
|
495
|
-
};
|
|
496
|
-
[k: string]: unknown;
|
|
497
|
-
}
|
|
498
|
-
namespace MarkdownChunkGeneratedMetadata {
|
|
499
|
-
interface ChunkHeading {
|
|
500
|
-
level: number;
|
|
501
|
-
text: string;
|
|
502
|
-
}
|
|
503
|
-
interface HeadingContext {
|
|
504
|
-
level: number;
|
|
505
|
-
text: string;
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
interface TextChunkGeneratedMetadata {
|
|
509
|
-
type?: 'text';
|
|
510
|
-
file_type?: 'text/plain';
|
|
511
|
-
language?: string | null;
|
|
512
|
-
word_count?: number | null;
|
|
513
|
-
file_size?: number | null;
|
|
514
|
-
start_line?: number;
|
|
515
|
-
num_lines?: number;
|
|
516
|
-
file_extension?: string | null;
|
|
517
|
-
[k: string]: unknown;
|
|
518
|
-
}
|
|
519
|
-
interface PdfChunkGeneratedMetadata {
|
|
520
|
-
type?: 'pdf';
|
|
521
|
-
file_type?: 'application/pdf';
|
|
522
|
-
total_pages?: number | null;
|
|
523
|
-
total_size?: number | null;
|
|
524
|
-
file_extension?: string | null;
|
|
525
|
-
[k: string]: unknown;
|
|
526
|
-
}
|
|
527
|
-
interface CodeChunkGeneratedMetadata {
|
|
528
|
-
type?: 'code';
|
|
529
|
-
file_type: string;
|
|
530
|
-
language?: string | null;
|
|
531
|
-
word_count?: number | null;
|
|
532
|
-
file_size?: number | null;
|
|
533
|
-
start_line?: number;
|
|
534
|
-
num_lines?: number;
|
|
535
|
-
file_extension?: string | null;
|
|
536
|
-
[k: string]: unknown;
|
|
537
|
-
}
|
|
538
|
-
interface AudioChunkGeneratedMetadata {
|
|
539
|
-
type?: 'audio';
|
|
540
|
-
file_type?: string;
|
|
541
|
-
file_size?: number | null;
|
|
542
|
-
total_duration_seconds?: number | null;
|
|
543
|
-
sample_rate?: number | null;
|
|
544
|
-
channels?: number | null;
|
|
545
|
-
audio_format?: number | null;
|
|
546
|
-
bpm?: number | null;
|
|
547
|
-
file_extension?: string | null;
|
|
548
|
-
[k: string]: unknown;
|
|
549
|
-
}
|
|
550
|
-
interface VideoChunkGeneratedMetadata {
|
|
551
|
-
type?: 'video';
|
|
552
|
-
file_type?: string;
|
|
553
|
-
file_size?: number | null;
|
|
554
|
-
total_duration_seconds?: number | null;
|
|
555
|
-
fps?: number | null;
|
|
556
|
-
width?: number | null;
|
|
557
|
-
height?: number | null;
|
|
558
|
-
frame_count?: number | null;
|
|
559
|
-
has_audio_stream?: boolean;
|
|
560
|
-
bpm?: number | null;
|
|
561
|
-
file_extension?: string | null;
|
|
562
|
-
[k: string]: unknown;
|
|
563
|
-
}
|
|
564
|
-
interface ImageChunkGeneratedMetadata {
|
|
565
|
-
type?: 'image';
|
|
566
|
-
file_type?: string;
|
|
567
|
-
file_size?: number | null;
|
|
568
|
-
width?: number | null;
|
|
569
|
-
height?: number | null;
|
|
570
|
-
file_extension?: string | null;
|
|
571
|
-
[k: string]: unknown;
|
|
572
|
-
}
|
|
573
|
-
/**
|
|
574
|
-
* Model for image URL validation.
|
|
575
|
-
*/
|
|
576
|
-
interface ImageURL {
|
|
577
|
-
/**
|
|
578
|
-
* The image URL. Can be either a URL or a Data URI.
|
|
579
|
-
*/
|
|
580
|
-
url: string;
|
|
581
|
-
/**
|
|
582
|
-
* The image format/mimetype
|
|
583
|
-
*/
|
|
584
|
-
format?: string;
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
interface AudioURLInputChunk {
|
|
588
|
-
/**
|
|
589
|
-
* position of the chunk in a file
|
|
590
|
-
*/
|
|
591
|
-
chunk_index: number;
|
|
592
|
-
/**
|
|
593
|
-
* mime type of the chunk
|
|
594
|
-
*/
|
|
595
|
-
mime_type?: string;
|
|
596
|
-
/**
|
|
597
|
-
* metadata of the chunk
|
|
598
|
-
*/
|
|
599
|
-
generated_metadata?: AudioURLInputChunk.MarkdownChunkGeneratedMetadata | AudioURLInputChunk.TextChunkGeneratedMetadata | AudioURLInputChunk.PdfChunkGeneratedMetadata | AudioURLInputChunk.CodeChunkGeneratedMetadata | AudioURLInputChunk.AudioChunkGeneratedMetadata | AudioURLInputChunk.VideoChunkGeneratedMetadata | AudioURLInputChunk.ImageChunkGeneratedMetadata | null;
|
|
600
|
-
/**
|
|
601
|
-
* model used for this chunk
|
|
602
|
-
*/
|
|
603
|
-
model?: string | null;
|
|
604
|
-
/**
|
|
605
|
-
* Input type identifier
|
|
606
|
-
*/
|
|
607
|
-
type?: 'audio_url';
|
|
608
|
-
/**
|
|
609
|
-
* speech recognition (sr) text of the audio
|
|
610
|
-
*/
|
|
611
|
-
transcription?: string | null;
|
|
612
|
-
/**
|
|
613
|
-
* summary of the audio
|
|
614
|
-
*/
|
|
615
|
-
summary?: string | null;
|
|
616
|
-
/**
|
|
617
|
-
* Model for audio URL validation.
|
|
618
|
-
*/
|
|
619
|
-
audio_url?: AudioURLInputChunk.AudioURL | null;
|
|
620
|
-
/**
|
|
621
|
-
* The sampling rate of the audio.
|
|
622
|
-
*/
|
|
623
|
-
sampling_rate: number;
|
|
624
|
-
}
|
|
625
|
-
namespace AudioURLInputChunk {
|
|
626
|
-
interface MarkdownChunkGeneratedMetadata {
|
|
627
|
-
type?: 'markdown';
|
|
628
|
-
file_type?: 'text/markdown';
|
|
629
|
-
language?: string | null;
|
|
630
|
-
word_count?: number | null;
|
|
631
|
-
file_size?: number | null;
|
|
632
|
-
chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
|
|
633
|
-
heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
|
|
634
|
-
start_line?: number;
|
|
635
|
-
num_lines?: number;
|
|
636
|
-
file_extension?: string | null;
|
|
637
|
-
frontmatter?: {
|
|
638
|
-
[key: string]: unknown;
|
|
639
|
-
};
|
|
640
|
-
[k: string]: unknown;
|
|
641
|
-
}
|
|
642
|
-
namespace MarkdownChunkGeneratedMetadata {
|
|
643
|
-
interface ChunkHeading {
|
|
644
|
-
level: number;
|
|
645
|
-
text: string;
|
|
646
|
-
}
|
|
647
|
-
interface HeadingContext {
|
|
648
|
-
level: number;
|
|
649
|
-
text: string;
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
interface TextChunkGeneratedMetadata {
|
|
653
|
-
type?: 'text';
|
|
654
|
-
file_type?: 'text/plain';
|
|
655
|
-
language?: string | null;
|
|
656
|
-
word_count?: number | null;
|
|
657
|
-
file_size?: number | null;
|
|
658
|
-
start_line?: number;
|
|
659
|
-
num_lines?: number;
|
|
660
|
-
file_extension?: string | null;
|
|
661
|
-
[k: string]: unknown;
|
|
662
|
-
}
|
|
663
|
-
interface PdfChunkGeneratedMetadata {
|
|
664
|
-
type?: 'pdf';
|
|
665
|
-
file_type?: 'application/pdf';
|
|
666
|
-
total_pages?: number | null;
|
|
667
|
-
total_size?: number | null;
|
|
668
|
-
file_extension?: string | null;
|
|
669
|
-
[k: string]: unknown;
|
|
670
|
-
}
|
|
671
|
-
interface CodeChunkGeneratedMetadata {
|
|
672
|
-
type?: 'code';
|
|
673
|
-
file_type: string;
|
|
674
|
-
language?: string | null;
|
|
675
|
-
word_count?: number | null;
|
|
676
|
-
file_size?: number | null;
|
|
677
|
-
start_line?: number;
|
|
678
|
-
num_lines?: number;
|
|
679
|
-
file_extension?: string | null;
|
|
680
|
-
[k: string]: unknown;
|
|
681
|
-
}
|
|
682
|
-
interface AudioChunkGeneratedMetadata {
|
|
683
|
-
type?: 'audio';
|
|
684
|
-
file_type?: string;
|
|
685
|
-
file_size?: number | null;
|
|
686
|
-
total_duration_seconds?: number | null;
|
|
687
|
-
sample_rate?: number | null;
|
|
688
|
-
channels?: number | null;
|
|
689
|
-
audio_format?: number | null;
|
|
690
|
-
bpm?: number | null;
|
|
691
|
-
file_extension?: string | null;
|
|
692
|
-
[k: string]: unknown;
|
|
693
|
-
}
|
|
694
|
-
interface VideoChunkGeneratedMetadata {
|
|
695
|
-
type?: 'video';
|
|
696
|
-
file_type?: string;
|
|
697
|
-
file_size?: number | null;
|
|
698
|
-
total_duration_seconds?: number | null;
|
|
699
|
-
fps?: number | null;
|
|
700
|
-
width?: number | null;
|
|
701
|
-
height?: number | null;
|
|
702
|
-
frame_count?: number | null;
|
|
703
|
-
has_audio_stream?: boolean;
|
|
704
|
-
bpm?: number | null;
|
|
705
|
-
file_extension?: string | null;
|
|
706
|
-
[k: string]: unknown;
|
|
707
|
-
}
|
|
708
|
-
interface ImageChunkGeneratedMetadata {
|
|
709
|
-
type?: 'image';
|
|
710
|
-
file_type?: string;
|
|
711
|
-
file_size?: number | null;
|
|
712
|
-
width?: number | null;
|
|
713
|
-
height?: number | null;
|
|
714
|
-
file_extension?: string | null;
|
|
715
|
-
[k: string]: unknown;
|
|
716
|
-
}
|
|
717
|
-
/**
|
|
718
|
-
* Model for audio URL validation.
|
|
719
|
-
*/
|
|
720
|
-
interface AudioURL {
|
|
721
|
-
/**
|
|
722
|
-
* The audio URL. Can be either a URL or a Data URI.
|
|
723
|
-
*/
|
|
724
|
-
url: string;
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
interface VideoURLInputChunk {
|
|
728
|
-
/**
|
|
729
|
-
* position of the chunk in a file
|
|
730
|
-
*/
|
|
731
|
-
chunk_index: number;
|
|
732
|
-
/**
|
|
733
|
-
* mime type of the chunk
|
|
734
|
-
*/
|
|
735
|
-
mime_type?: string;
|
|
736
|
-
/**
|
|
737
|
-
* metadata of the chunk
|
|
738
|
-
*/
|
|
739
|
-
generated_metadata?: VideoURLInputChunk.MarkdownChunkGeneratedMetadata | VideoURLInputChunk.TextChunkGeneratedMetadata | VideoURLInputChunk.PdfChunkGeneratedMetadata | VideoURLInputChunk.CodeChunkGeneratedMetadata | VideoURLInputChunk.AudioChunkGeneratedMetadata | VideoURLInputChunk.VideoChunkGeneratedMetadata | VideoURLInputChunk.ImageChunkGeneratedMetadata | null;
|
|
740
|
-
/**
|
|
741
|
-
* model used for this chunk
|
|
742
|
-
*/
|
|
743
|
-
model?: string | null;
|
|
744
|
-
/**
|
|
745
|
-
* Input type identifier
|
|
746
|
-
*/
|
|
747
|
-
type?: 'video_url';
|
|
748
|
-
/**
|
|
749
|
-
* speech recognition (sr) text of the video
|
|
750
|
-
*/
|
|
751
|
-
transcription?: string | null;
|
|
752
|
-
/**
|
|
753
|
-
* summary of the video
|
|
754
|
-
*/
|
|
755
|
-
summary?: 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
|