@mixedbread/sdk 0.69.0 → 0.71.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 +16 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/stores/files.d.mts +4 -0
- package/resources/stores/files.d.mts.map +1 -1
- package/resources/stores/files.d.ts +4 -0
- package/resources/stores/files.d.ts.map +1 -1
- package/resources/stores/index.d.mts +1 -1
- package/resources/stores/index.d.mts.map +1 -1
- package/resources/stores/index.d.ts +1 -1
- 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 +111 -1
- package/resources/stores/stores.d.mts.map +1 -1
- package/resources/stores/stores.d.ts +111 -1
- package/resources/stores/stores.d.ts.map +1 -1
- package/resources/stores/stores.js +34 -0
- package/resources/stores/stores.js.map +1 -1
- package/resources/stores/stores.mjs +34 -0
- package/resources/stores/stores.mjs.map +1 -1
- package/src/client.ts +4 -0
- package/src/resources/index.ts +2 -0
- package/src/resources/stores/files.ts +5 -0
- package/src/resources/stores/index.ts +2 -0
- package/src/resources/stores/stores.ts +136 -0
- 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/resources/index.ts
CHANGED
|
@@ -68,6 +68,7 @@ export {
|
|
|
68
68
|
type VideoURL,
|
|
69
69
|
type StoreDeleteResponse,
|
|
70
70
|
type StoreGrepResponse,
|
|
71
|
+
type StoreListChunksResponse,
|
|
71
72
|
type StoreMetadataFacetsResponse,
|
|
72
73
|
type StoreQuestionAnsweringResponse,
|
|
73
74
|
type StoreSearchResponse,
|
|
@@ -75,6 +76,7 @@ export {
|
|
|
75
76
|
type StoreUpdateParams,
|
|
76
77
|
type StoreListParams,
|
|
77
78
|
type StoreGrepParams,
|
|
79
|
+
type StoreListChunksParams,
|
|
78
80
|
type StoreMetadataFacetsParams,
|
|
79
81
|
type StoreQuestionAnsweringParams,
|
|
80
82
|
type StoreSearchParams,
|
|
@@ -652,6 +652,11 @@ export interface TextInputChunk {
|
|
|
652
652
|
* LLM-generated context that situates this chunk within its source document
|
|
653
653
|
*/
|
|
654
654
|
context?: string | null;
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* summary of the text chunk
|
|
658
|
+
*/
|
|
659
|
+
summary?: string | null;
|
|
655
660
|
}
|
|
656
661
|
|
|
657
662
|
export interface VideoURLInputChunk {
|
|
@@ -48,6 +48,7 @@ export {
|
|
|
48
48
|
type VideoURL,
|
|
49
49
|
type StoreDeleteResponse,
|
|
50
50
|
type StoreGrepResponse,
|
|
51
|
+
type StoreListChunksResponse,
|
|
51
52
|
type StoreMetadataFacetsResponse,
|
|
52
53
|
type StoreQuestionAnsweringResponse,
|
|
53
54
|
type StoreSearchResponse,
|
|
@@ -55,6 +56,7 @@ export {
|
|
|
55
56
|
type StoreUpdateParams,
|
|
56
57
|
type StoreListParams,
|
|
57
58
|
type StoreGrepParams,
|
|
59
|
+
type StoreListChunksParams,
|
|
58
60
|
type StoreMetadataFacetsParams,
|
|
59
61
|
type StoreQuestionAnsweringParams,
|
|
60
62
|
type StoreSearchParams,
|
|
@@ -158,6 +158,41 @@ export class Stores extends APIResource {
|
|
|
158
158
|
return this._client.post('/v1/stores/grep', { body, ...options });
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
+
/**
|
|
162
|
+
* List store chunks purely by metadata filters — no embeddings, no semantic
|
|
163
|
+
* similarity, no reranking.
|
|
164
|
+
*
|
|
165
|
+
* Unlike `/stores/search`, this endpoint does not require a query and never runs a
|
|
166
|
+
* vector lookup. It returns chunks whose file and chunk metadata satisfy
|
|
167
|
+
* `filters`, optionally ordered by a numeric metadata field via `sort_by`. Useful
|
|
168
|
+
* for ranked retrieval over numeric attributes (e.g. price, BPM) and for
|
|
169
|
+
* reproducing the agentic `filter_chunks` tool externally.
|
|
170
|
+
*
|
|
171
|
+
* list-chunks targets a single store and does not support pagination; raise
|
|
172
|
+
* `top_k` to retrieve more chunks.
|
|
173
|
+
*
|
|
174
|
+
* Args: filter_params: Filter configuration including: - store_identifiers: the
|
|
175
|
+
* single store to filter against - filters: optional metadata filter conditions -
|
|
176
|
+
* file_ids: optional list of file IDs to filter chunks by - sort_by: optional
|
|
177
|
+
* metadata field path, or `(field, ascending)` tuple, for numeric ordering -
|
|
178
|
+
* top_k: number of chunks to return
|
|
179
|
+
*
|
|
180
|
+
* Returns: StoreListChunksResponse containing the list of matching chunks.
|
|
181
|
+
*
|
|
182
|
+
* Raises: HTTPException (400): If filter parameters are invalid or multiple stores
|
|
183
|
+
* are passed HTTPException (404): If the store is not found
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```ts
|
|
187
|
+
* const response = await client.stores.listChunks({
|
|
188
|
+
* store_identifiers: ['string'],
|
|
189
|
+
* });
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
listChunks(body: StoreListChunksParams, options?: RequestOptions): APIPromise<StoreListChunksResponse> {
|
|
193
|
+
return this._client.post('/v1/stores/list-chunks', { body, ...options });
|
|
194
|
+
}
|
|
195
|
+
|
|
161
196
|
/**
|
|
162
197
|
* Get metadata facets
|
|
163
198
|
*
|
|
@@ -729,6 +764,11 @@ export interface ScoredTextInputChunk {
|
|
|
729
764
|
* LLM-generated context that situates this chunk within its source document
|
|
730
765
|
*/
|
|
731
766
|
context?: string | null;
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* summary of the text chunk
|
|
770
|
+
*/
|
|
771
|
+
summary?: string | null;
|
|
732
772
|
}
|
|
733
773
|
|
|
734
774
|
export interface ScoredVideoURLInputChunk {
|
|
@@ -1046,6 +1086,20 @@ export interface StoreGrepResponse {
|
|
|
1046
1086
|
>;
|
|
1047
1087
|
}
|
|
1048
1088
|
|
|
1089
|
+
export interface StoreListChunksResponse {
|
|
1090
|
+
/**
|
|
1091
|
+
* The object type of the response
|
|
1092
|
+
*/
|
|
1093
|
+
object?: 'list';
|
|
1094
|
+
|
|
1095
|
+
/**
|
|
1096
|
+
* The list of chunks matching the metadata filters
|
|
1097
|
+
*/
|
|
1098
|
+
data: Array<
|
|
1099
|
+
ScoredTextInputChunk | ScoredImageURLInputChunk | ScoredAudioURLInputChunk | ScoredVideoURLInputChunk
|
|
1100
|
+
>;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1049
1103
|
/**
|
|
1050
1104
|
* Represents metadata facets for a store.
|
|
1051
1105
|
*/
|
|
@@ -1262,6 +1316,86 @@ export namespace StoreGrepParams {
|
|
|
1262
1316
|
}
|
|
1263
1317
|
}
|
|
1264
1318
|
|
|
1319
|
+
export interface StoreListChunksParams {
|
|
1320
|
+
/**
|
|
1321
|
+
* IDs or names of stores
|
|
1322
|
+
*/
|
|
1323
|
+
store_identifiers: Array<string>;
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* Number of results to return
|
|
1327
|
+
*/
|
|
1328
|
+
top_k?: number;
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* Optional filter conditions
|
|
1332
|
+
*/
|
|
1333
|
+
filters?:
|
|
1334
|
+
| StoreListChunksParams.SearchFilterInput
|
|
1335
|
+
| Shared.SearchFilterCondition
|
|
1336
|
+
| Array<StoreListChunksParams.SearchFilterInput | Shared.SearchFilterCondition>
|
|
1337
|
+
| null;
|
|
1338
|
+
|
|
1339
|
+
/**
|
|
1340
|
+
* Optional list of file IDs to filter chunks by (inclusion filter)
|
|
1341
|
+
*/
|
|
1342
|
+
file_ids?: Array<unknown> | Array<string> | null;
|
|
1343
|
+
|
|
1344
|
+
/**
|
|
1345
|
+
* Optional sort applied to the returned chunks. Pass a metadata field path or a
|
|
1346
|
+
* tuple of (field path, ascending). Unprefixed dot paths target file metadata;
|
|
1347
|
+
* generated_metadata.\* targets chunk metadata.
|
|
1348
|
+
*/
|
|
1349
|
+
sort_by?: string | Array<unknown> | null;
|
|
1350
|
+
|
|
1351
|
+
/**
|
|
1352
|
+
* Search configuration options
|
|
1353
|
+
*/
|
|
1354
|
+
search_options?: StoreChunkSearchOptions;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
export namespace StoreListChunksParams {
|
|
1358
|
+
/**
|
|
1359
|
+
* Represents a filter with AND, OR, and NOT conditions.
|
|
1360
|
+
*/
|
|
1361
|
+
export interface SearchFilterInput {
|
|
1362
|
+
/**
|
|
1363
|
+
* List of conditions or filters to be ANDed together
|
|
1364
|
+
*/
|
|
1365
|
+
all?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1366
|
+
|
|
1367
|
+
/**
|
|
1368
|
+
* List of conditions or filters to be ORed together
|
|
1369
|
+
*/
|
|
1370
|
+
any?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1371
|
+
|
|
1372
|
+
/**
|
|
1373
|
+
* List of conditions or filters to be NOTed
|
|
1374
|
+
*/
|
|
1375
|
+
none?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
/**
|
|
1379
|
+
* Represents a filter with AND, OR, and NOT conditions.
|
|
1380
|
+
*/
|
|
1381
|
+
export interface SearchFilterInput {
|
|
1382
|
+
/**
|
|
1383
|
+
* List of conditions or filters to be ANDed together
|
|
1384
|
+
*/
|
|
1385
|
+
all?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1386
|
+
|
|
1387
|
+
/**
|
|
1388
|
+
* List of conditions or filters to be ORed together
|
|
1389
|
+
*/
|
|
1390
|
+
any?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1391
|
+
|
|
1392
|
+
/**
|
|
1393
|
+
* List of conditions or filters to be NOTed
|
|
1394
|
+
*/
|
|
1395
|
+
none?: Array<unknown | Shared.SearchFilterCondition> | null;
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1265
1399
|
export interface StoreMetadataFacetsParams {
|
|
1266
1400
|
/**
|
|
1267
1401
|
* IDs or names of stores
|
|
@@ -1577,6 +1711,7 @@ export declare namespace Stores {
|
|
|
1577
1711
|
type VideoURL as VideoURL,
|
|
1578
1712
|
type StoreDeleteResponse as StoreDeleteResponse,
|
|
1579
1713
|
type StoreGrepResponse as StoreGrepResponse,
|
|
1714
|
+
type StoreListChunksResponse as StoreListChunksResponse,
|
|
1580
1715
|
type StoreMetadataFacetsResponse as StoreMetadataFacetsResponse,
|
|
1581
1716
|
type StoreQuestionAnsweringResponse as StoreQuestionAnsweringResponse,
|
|
1582
1717
|
type StoreSearchResponse as StoreSearchResponse,
|
|
@@ -1585,6 +1720,7 @@ export declare namespace Stores {
|
|
|
1585
1720
|
type StoreUpdateParams as StoreUpdateParams,
|
|
1586
1721
|
type StoreListParams as StoreListParams,
|
|
1587
1722
|
type StoreGrepParams as StoreGrepParams,
|
|
1723
|
+
type StoreListChunksParams as StoreListChunksParams,
|
|
1588
1724
|
type StoreMetadataFacetsParams as StoreMetadataFacetsParams,
|
|
1589
1725
|
type StoreQuestionAnsweringParams as StoreQuestionAnsweringParams,
|
|
1590
1726
|
type StoreSearchParams as StoreSearchParams,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.71.0'; // 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.71.0";
|
|
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.71.0";
|
|
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.71.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|