@mixedbread/sdk 0.1.0-alpha.9 → 0.2.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 +391 -0
- package/README.md +4 -4
- package/_shims/index.d.ts +2 -0
- package/_shims/index.js +5 -1
- package/_shims/index.mjs +5 -1
- package/core.d.ts +11 -0
- package/core.d.ts.map +1 -1
- package/core.js +5 -2
- package/core.js.map +1 -1
- package/core.mjs +6 -3
- package/core.mjs.map +1 -1
- package/index.d.mts +28 -7
- package/index.d.ts +28 -7
- package/index.d.ts.map +1 -1
- package/index.js +32 -8
- package/index.js.map +1 -1
- package/index.mjs +32 -8
- package/index.mjs.map +1 -1
- package/package.json +8 -29
- package/resources/embeddings.d.ts +45 -0
- package/resources/embeddings.d.ts.map +1 -0
- package/resources/embeddings.js +20 -0
- package/resources/embeddings.js.map +1 -0
- package/resources/embeddings.mjs +16 -0
- package/resources/embeddings.mjs.map +1 -0
- package/resources/extractions/content.d.ts +2 -2
- package/resources/extractions/content.d.ts.map +1 -1
- package/resources/extractions/jobs.d.ts +3 -3
- package/resources/extractions/jobs.d.ts.map +1 -1
- package/resources/extractions/schema.d.ts +5 -5
- package/resources/extractions/schema.d.ts.map +1 -1
- package/resources/extractions.d.ts +2 -0
- package/resources/extractions.d.ts.map +1 -0
- package/resources/extractions.js +19 -0
- package/resources/extractions.js.map +1 -0
- package/resources/extractions.mjs +3 -0
- package/resources/extractions.mjs.map +1 -0
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/parsing/jobs.d.ts +8 -0
- 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.d.ts +2 -0
- package/resources/parsing.d.ts.map +1 -0
- package/resources/parsing.js +19 -0
- package/resources/parsing.js.map +1 -0
- package/resources/parsing.mjs +3 -0
- package/resources/parsing.mjs.map +1 -0
- package/resources/shared.d.ts +14 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/top-level.d.ts +174 -1
- package/resources/top-level.d.ts.map +1 -1
- package/resources/vector-stores/files.d.ts +12 -0
- package/resources/vector-stores/files.d.ts.map +1 -1
- package/resources/vector-stores/files.js.map +1 -1
- package/resources/vector-stores/files.mjs.map +1 -1
- package/resources/vector-stores/vector-stores.d.ts +4 -0
- package/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/vector-stores/vector-stores.js.map +1 -1
- package/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/resources/vector-stores.d.ts +2 -0
- package/resources/vector-stores.d.ts.map +1 -0
- package/resources/vector-stores.js +19 -0
- package/resources/vector-stores.js.map +1 -0
- package/resources/vector-stores.mjs +3 -0
- package/resources/vector-stores.mjs.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +18 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/_shims/index.d.ts +2 -0
- package/src/_shims/index.js +5 -1
- package/src/_shims/index.mjs +5 -1
- package/src/core.ts +23 -4
- package/src/index.ts +72 -21
- package/src/resources/embeddings.ts +67 -0
- package/src/resources/extractions/content.ts +2 -2
- package/src/resources/extractions/jobs.ts +3 -3
- package/src/resources/extractions/schema.ts +5 -5
- package/src/resources/extractions.ts +3 -0
- package/src/resources/index.ts +10 -1
- package/src/resources/parsing/jobs.ts +10 -0
- package/src/resources/parsing.ts +3 -0
- package/src/resources/shared.ts +17 -0
- package/src/resources/top-level.ts +260 -1
- package/src/resources/vector-stores/files.ts +15 -0
- package/src/resources/vector-stores/vector-stores.ts +5 -0
- package/src/resources/vector-stores.ts +3 -0
- package/src/resources.ts +1 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
@@ -1,5 +1,117 @@
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
+
import * as Shared from './shared';
|
4
|
+
|
5
|
+
export interface Embedding {
|
6
|
+
/**
|
7
|
+
* The encoded embedding.
|
8
|
+
*/
|
9
|
+
embedding: Array<number> | Array<number> | string;
|
10
|
+
|
11
|
+
/**
|
12
|
+
* The index of the embedding.
|
13
|
+
*/
|
14
|
+
index: number;
|
15
|
+
|
16
|
+
/**
|
17
|
+
* The object type of the embedding.
|
18
|
+
*/
|
19
|
+
object?: 'embedding';
|
20
|
+
}
|
21
|
+
|
22
|
+
export interface EmbeddingCreateResponse {
|
23
|
+
/**
|
24
|
+
* The usage of the model
|
25
|
+
*/
|
26
|
+
usage: Shared.Usage;
|
27
|
+
|
28
|
+
/**
|
29
|
+
* The model used
|
30
|
+
*/
|
31
|
+
model: string;
|
32
|
+
|
33
|
+
/**
|
34
|
+
* The created embeddings.
|
35
|
+
*/
|
36
|
+
data: Array<Embedding> | Array<MultiEncodingEmbedding>;
|
37
|
+
|
38
|
+
/**
|
39
|
+
* The object type of the response
|
40
|
+
*/
|
41
|
+
object?:
|
42
|
+
| 'list'
|
43
|
+
| 'parsing_job'
|
44
|
+
| 'job'
|
45
|
+
| 'embedding'
|
46
|
+
| 'embedding_dict'
|
47
|
+
| 'rank_result'
|
48
|
+
| 'file'
|
49
|
+
| 'vector_store'
|
50
|
+
| 'vector_store.file'
|
51
|
+
| 'api_key';
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Whether the embeddings are normalized.
|
55
|
+
*/
|
56
|
+
normalized: boolean;
|
57
|
+
|
58
|
+
/**
|
59
|
+
* The encoding formats of the embeddings.
|
60
|
+
*/
|
61
|
+
encoding_format:
|
62
|
+
| 'float'
|
63
|
+
| 'float16'
|
64
|
+
| 'base64'
|
65
|
+
| 'binary'
|
66
|
+
| 'ubinary'
|
67
|
+
| 'int8'
|
68
|
+
| 'uint8'
|
69
|
+
| Array<'float' | 'float16' | 'base64' | 'binary' | 'ubinary' | 'int8' | 'uint8'>;
|
70
|
+
|
71
|
+
/**
|
72
|
+
* The number of dimensions used for the embeddings.
|
73
|
+
*/
|
74
|
+
dimensions: number | null;
|
75
|
+
}
|
76
|
+
|
77
|
+
export interface MultiEncodingEmbedding {
|
78
|
+
/**
|
79
|
+
* The encoded embedding data by encoding format.Returned, if more than one
|
80
|
+
* encoding format is used.
|
81
|
+
*/
|
82
|
+
embedding: MultiEncodingEmbedding.Embedding;
|
83
|
+
|
84
|
+
/**
|
85
|
+
* The index of the embedding.
|
86
|
+
*/
|
87
|
+
index: number;
|
88
|
+
|
89
|
+
/**
|
90
|
+
* The object type of the embedding.
|
91
|
+
*/
|
92
|
+
object?: 'embedding_dict';
|
93
|
+
}
|
94
|
+
|
95
|
+
export namespace MultiEncodingEmbedding {
|
96
|
+
/**
|
97
|
+
* The encoded embedding data by encoding format.Returned, if more than one
|
98
|
+
* encoding format is used.
|
99
|
+
*/
|
100
|
+
export interface Embedding {
|
101
|
+
float?: Array<number>;
|
102
|
+
|
103
|
+
int8?: Array<number>;
|
104
|
+
|
105
|
+
uint8?: Array<number>;
|
106
|
+
|
107
|
+
binary?: Array<number>;
|
108
|
+
|
109
|
+
ubinary?: Array<number>;
|
110
|
+
|
111
|
+
base64?: string;
|
112
|
+
}
|
113
|
+
}
|
114
|
+
|
3
115
|
/**
|
4
116
|
* Info Pydantic Response Service Message
|
5
117
|
*/
|
@@ -9,6 +121,153 @@ export interface InfoResponse {
|
|
9
121
|
version: string;
|
10
122
|
}
|
11
123
|
|
124
|
+
export interface RerankResponse {
|
125
|
+
/**
|
126
|
+
* The usage of the model
|
127
|
+
*/
|
128
|
+
usage: Shared.Usage;
|
129
|
+
|
130
|
+
/**
|
131
|
+
* The model used
|
132
|
+
*/
|
133
|
+
model: string;
|
134
|
+
|
135
|
+
/**
|
136
|
+
* The ranked documents.
|
137
|
+
*/
|
138
|
+
data: Array<RerankResponse.Data>;
|
139
|
+
|
140
|
+
/**
|
141
|
+
* The object type of the response
|
142
|
+
*/
|
143
|
+
object?:
|
144
|
+
| 'list'
|
145
|
+
| 'parsing_job'
|
146
|
+
| 'job'
|
147
|
+
| 'embedding'
|
148
|
+
| 'embedding_dict'
|
149
|
+
| 'rank_result'
|
150
|
+
| 'file'
|
151
|
+
| 'vector_store'
|
152
|
+
| 'vector_store.file'
|
153
|
+
| 'api_key';
|
154
|
+
|
155
|
+
/**
|
156
|
+
* The number of documents to return.
|
157
|
+
*/
|
158
|
+
top_k: number;
|
159
|
+
|
160
|
+
/**
|
161
|
+
* Whether to return the documents.
|
162
|
+
*/
|
163
|
+
return_input: boolean;
|
164
|
+
}
|
165
|
+
|
166
|
+
export namespace RerankResponse {
|
167
|
+
export interface Data {
|
168
|
+
/**
|
169
|
+
* The index of the document.
|
170
|
+
*/
|
171
|
+
index: number;
|
172
|
+
|
173
|
+
/**
|
174
|
+
* The score of the document.
|
175
|
+
*/
|
176
|
+
score: number;
|
177
|
+
|
178
|
+
/**
|
179
|
+
* The input document.
|
180
|
+
*/
|
181
|
+
input?: unknown;
|
182
|
+
|
183
|
+
/**
|
184
|
+
* The object type.
|
185
|
+
*/
|
186
|
+
object?: 'rank_result';
|
187
|
+
}
|
188
|
+
}
|
189
|
+
|
190
|
+
export interface EmbedParams {
|
191
|
+
/**
|
192
|
+
* The model to use for creating embeddings.
|
193
|
+
*/
|
194
|
+
model: string;
|
195
|
+
|
196
|
+
/**
|
197
|
+
* The input to create embeddings for.
|
198
|
+
*/
|
199
|
+
input: string | Array<string>;
|
200
|
+
|
201
|
+
/**
|
202
|
+
* The number of dimensions to use for the embeddings.
|
203
|
+
*/
|
204
|
+
dimensions?: number | null;
|
205
|
+
|
206
|
+
/**
|
207
|
+
* The prompt to use for the embedding creation.
|
208
|
+
*/
|
209
|
+
prompt?: string | null;
|
210
|
+
|
211
|
+
/**
|
212
|
+
* Whether to normalize the embeddings.
|
213
|
+
*/
|
214
|
+
normalized?: boolean;
|
215
|
+
|
216
|
+
/**
|
217
|
+
* The encoding format(s) of the embeddings. Can be a single format or a list of
|
218
|
+
* formats.
|
219
|
+
*/
|
220
|
+
encoding_format?:
|
221
|
+
| 'float'
|
222
|
+
| 'float16'
|
223
|
+
| 'base64'
|
224
|
+
| 'binary'
|
225
|
+
| 'ubinary'
|
226
|
+
| 'int8'
|
227
|
+
| 'uint8'
|
228
|
+
| Array<'float' | 'float16' | 'base64' | 'binary' | 'ubinary' | 'int8' | 'uint8'>;
|
229
|
+
}
|
230
|
+
|
231
|
+
export interface RerankParams {
|
232
|
+
/**
|
233
|
+
* The model to use for reranking documents.
|
234
|
+
*/
|
235
|
+
model?: string;
|
236
|
+
|
237
|
+
/**
|
238
|
+
* The query to rerank the documents.
|
239
|
+
*/
|
240
|
+
query: string;
|
241
|
+
|
242
|
+
/**
|
243
|
+
* The input documents to rerank.
|
244
|
+
*/
|
245
|
+
input: Array<string | unknown | Array<unknown>>;
|
246
|
+
|
247
|
+
/**
|
248
|
+
* The fields of the documents to rank.
|
249
|
+
*/
|
250
|
+
rank_fields?: Array<string> | null;
|
251
|
+
|
252
|
+
/**
|
253
|
+
* The number of documents to return.
|
254
|
+
*/
|
255
|
+
top_k?: number;
|
256
|
+
|
257
|
+
/**
|
258
|
+
* Whether to return the documents.
|
259
|
+
*/
|
260
|
+
return_input?: boolean;
|
261
|
+
}
|
262
|
+
|
12
263
|
export declare namespace TopLevel {
|
13
|
-
export {
|
264
|
+
export {
|
265
|
+
type Embedding as Embedding,
|
266
|
+
type EmbeddingCreateResponse as EmbeddingCreateResponse,
|
267
|
+
type MultiEncodingEmbedding as MultiEncodingEmbedding,
|
268
|
+
type InfoResponse as InfoResponse,
|
269
|
+
type RerankResponse as RerankResponse,
|
270
|
+
type EmbedParams as EmbedParams,
|
271
|
+
type RerankParams as RerankParams,
|
272
|
+
};
|
14
273
|
}
|
@@ -223,6 +223,11 @@ export interface ScoredVectorStoreFile {
|
|
223
223
|
*/
|
224
224
|
id: string;
|
225
225
|
|
226
|
+
/**
|
227
|
+
* Name of the file
|
228
|
+
*/
|
229
|
+
filename?: string;
|
230
|
+
|
226
231
|
/**
|
227
232
|
* Optional file metadata
|
228
233
|
*/
|
@@ -283,6 +288,11 @@ export interface VectorStoreFile {
|
|
283
288
|
*/
|
284
289
|
id: string;
|
285
290
|
|
291
|
+
/**
|
292
|
+
* Name of the file
|
293
|
+
*/
|
294
|
+
filename?: string;
|
295
|
+
|
286
296
|
/**
|
287
297
|
* Optional file metadata
|
288
298
|
*/
|
@@ -382,6 +392,11 @@ export namespace FileCreateParams {
|
|
382
392
|
* Strategy for adding the file
|
383
393
|
*/
|
384
394
|
parsing_strategy?: 'fast' | 'high_quality';
|
395
|
+
|
396
|
+
/**
|
397
|
+
* Whether to contextualize the file
|
398
|
+
*/
|
399
|
+
contextualization?: boolean;
|
385
400
|
}
|
386
401
|
}
|
387
402
|
|
package/src/resources.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export * from './resources/index';
|
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const VERSION = '0.
|
1
|
+
export const VERSION = '0.2.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const VERSION = "0.
|
1
|
+
export declare const VERSION = "0.2.0";
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/version.js
CHANGED
package/version.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
|
package/version.mjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export const VERSION = '0.
|
1
|
+
export const VERSION = '0.2.0'; // x-release-please-version
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/version.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
|