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