@mixedbread/sdk 0.1.0-alpha.19 → 0.1.0-alpha.22

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 CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.22 (2025-04-03)
4
+
5
+ Full Changelog: [v0.1.0-alpha.21...v0.1.0-alpha.22](https://github.com/mixedbread-ai/mixedbread-ts/compare/v0.1.0-alpha.21...v0.1.0-alpha.22)
6
+
7
+ ### Features
8
+
9
+ * **api:** update via SDK Studio ([bcf89e0](https://github.com/mixedbread-ai/mixedbread-ts/commit/bcf89e0218cc0e36a847d5c7e3d619c8855f09ee))
10
+
11
+ ## 0.1.0-alpha.21 (2025-04-03)
12
+
13
+ Full Changelog: [v0.1.0-alpha.20...v0.1.0-alpha.21](https://github.com/mixedbread-ai/mixedbread-ts/compare/v0.1.0-alpha.20...v0.1.0-alpha.21)
14
+
15
+ ### Features
16
+
17
+ * **api:** update via SDK Studio ([#149](https://github.com/mixedbread-ai/mixedbread-ts/issues/149)) ([5048518](https://github.com/mixedbread-ai/mixedbread-ts/commit/5048518c96fac491d49ce442776d8de093fcfe21))
18
+ * **api:** update via SDK Studio ([#151](https://github.com/mixedbread-ai/mixedbread-ts/issues/151)) ([78a5d80](https://github.com/mixedbread-ai/mixedbread-ts/commit/78a5d808466fecfe8632e812b56fbeba30d8d480))
19
+
20
+ ## 0.1.0-alpha.20 (2025-04-03)
21
+
22
+ Full Changelog: [v0.1.0-alpha.19...v0.1.0-alpha.20](https://github.com/mixedbread-ai/mixedbread-ts/compare/v0.1.0-alpha.19...v0.1.0-alpha.20)
23
+
24
+ ### Features
25
+
26
+ * **api:** update via SDK Studio ([#142](https://github.com/mixedbread-ai/mixedbread-ts/issues/142)) ([be169e6](https://github.com/mixedbread-ai/mixedbread-ts/commit/be169e6a64cbce82591d93f02f327f353769ad19))
27
+ * **api:** update via SDK Studio ([#144](https://github.com/mixedbread-ai/mixedbread-ts/issues/144)) ([ac3c4cf](https://github.com/mixedbread-ai/mixedbread-ts/commit/ac3c4cfe303837b1789c9b727e393c5888a93808))
28
+ * **api:** update via SDK Studio ([#145](https://github.com/mixedbread-ai/mixedbread-ts/issues/145)) ([d5f14db](https://github.com/mixedbread-ai/mixedbread-ts/commit/d5f14db8a4e9c5d2e4feba5e81a68b3cc9a09f29))
29
+ * **api:** update via SDK Studio ([#146](https://github.com/mixedbread-ai/mixedbread-ts/issues/146)) ([c3c2adb](https://github.com/mixedbread-ai/mixedbread-ts/commit/c3c2adbab2fbddf1a4ed814d1b6aeb9b39c5277f))
30
+
3
31
  ## 0.1.0-alpha.19 (2025-04-03)
4
32
 
5
33
  Full Changelog: [v0.1.0-alpha.18...v0.1.0-alpha.19](https://github.com/mixedbread-ai/mixedbread-ts/compare/v0.1.0-alpha.18...v0.1.0-alpha.19)
package/index.d.mts CHANGED
@@ -4,11 +4,10 @@ import * as Errors from "./error.js";
4
4
  import * as Pagination from "./pagination.js";
5
5
  import { type LimitOffsetParams, LimitOffsetResponse } from "./pagination.js";
6
6
  import * as Uploads from "./uploads.js";
7
- import * as EmbeddingsAPI from "./resources/embeddings.js";
8
- import { Embedding, EmbeddingCreateParams, EmbeddingCreateResponse, Embeddings } from "./resources/embeddings.js";
9
7
  import * as API from "./resources/index.js";
10
8
  import * as TopLevelAPI from "./resources/top-level.js";
11
- import { EmbedParams, InfoResponse, RerankParams, RerankResponse } from "./resources/top-level.js";
9
+ import { EmbedParams, Embedding, EmbeddingCreateResponse, InfoResponse, MultiEncodingEmbedding, RerankParams, RerankResponse } from "./resources/top-level.js";
10
+ import { EmbeddingCreateParams, Embeddings } from "./resources/embeddings.js";
12
11
  import { FileCreateParams, FileDeleteResponse, FileListParams, FileObject, FileObjectsLimitOffset, FileUpdateParams, Files } from "./resources/files.js";
13
12
  import { Extractions } from "./resources/extractions/extractions.js";
14
13
  import { Parsing } from "./resources/parsing/parsing.js";
@@ -101,11 +100,11 @@ export declare class Mixedbread extends Core.APIClient {
101
100
  * @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
102
101
  */
103
102
  constructor({ baseURL, apiKey, ...opts }?: ClientOptions);
104
- embeddings: API.Embeddings;
103
+ vectorStores: API.VectorStores;
105
104
  parsing: API.Parsing;
106
105
  files: API.Files;
107
- vectorStores: API.VectorStores;
108
106
  extractions: API.Extractions;
107
+ embeddings: API.Embeddings;
109
108
  /**
110
109
  * Create embeddings for text or images using the specified model, encoding format,
111
110
  * and normalization.
@@ -114,7 +113,7 @@ export declare class Mixedbread extends Core.APIClient {
114
113
  *
115
114
  * Returns: EmbeddingCreateResponse: The response containing the embeddings.
116
115
  */
117
- embed(body: TopLevelAPI.EmbedParams, options?: Core.RequestOptions): Core.APIPromise<EmbeddingsAPI.EmbeddingCreateResponse>;
116
+ embed(body: TopLevelAPI.EmbedParams, options?: Core.RequestOptions): Core.APIPromise<TopLevelAPI.EmbeddingCreateResponse>;
118
117
  /**
119
118
  * Returns service information, including name and version.
120
119
  *
@@ -124,9 +123,9 @@ export declare class Mixedbread extends Core.APIClient {
124
123
  /**
125
124
  * Rerank different kind of documents for a given query.
126
125
  *
127
- * Args: params: RerankingCreateParams: The parameters for reranking.
126
+ * Args: params: RerankParams: The parameters for reranking.
128
127
  *
129
- * Returns: RerankingCreateResponse: The reranked documents for the input query.
128
+ * Returns: RerankResponse: The reranked documents for the input query.
130
129
  */
131
130
  rerank(body: TopLevelAPI.RerankParams, options?: Core.RequestOptions): Core.APIPromise<TopLevelAPI.RerankResponse>;
132
131
  protected defaultQuery(): Core.DefaultQuery | undefined;
@@ -154,12 +153,12 @@ export declare namespace Mixedbread {
154
153
  export type RequestOptions = Core.RequestOptions;
155
154
  export import LimitOffset = Pagination.LimitOffset;
156
155
  export { type LimitOffsetParams as LimitOffsetParams, type LimitOffsetResponse as LimitOffsetResponse };
157
- export { type InfoResponse as InfoResponse, type RerankResponse as RerankResponse, type EmbedParams as EmbedParams, type RerankParams as RerankParams, };
158
- export { Embeddings as Embeddings, type Embedding as Embedding, type EmbeddingCreateResponse as EmbeddingCreateResponse, type EmbeddingCreateParams as EmbeddingCreateParams, };
156
+ export { type Embedding as Embedding, type EmbeddingCreateResponse as EmbeddingCreateResponse, type MultiEncodingEmbedding as MultiEncodingEmbedding, type InfoResponse as InfoResponse, type RerankResponse as RerankResponse, type EmbedParams as EmbedParams, type RerankParams as RerankParams, };
157
+ export { VectorStores as VectorStores, type ExpiresAfter as ExpiresAfter, type FileCounts as FileCounts, type ScoredVectorStoreChunk as ScoredVectorStoreChunk, type VectorStore as VectorStore, type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions, type VectorStoreFileSearchOptions as VectorStoreFileSearchOptions, type VectorStoreDeleteResponse as VectorStoreDeleteResponse, type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse, type VectorStoreSearchResponse as VectorStoreSearchResponse, VectorStoresLimitOffset as VectorStoresLimitOffset, type VectorStoreCreateParams as VectorStoreCreateParams, type VectorStoreUpdateParams as VectorStoreUpdateParams, type VectorStoreListParams as VectorStoreListParams, type VectorStoreQuestionAnsweringParams as VectorStoreQuestionAnsweringParams, type VectorStoreSearchParams as VectorStoreSearchParams, };
159
158
  export { Parsing as Parsing };
160
159
  export { Files as Files, type FileObject as FileObject, type FileDeleteResponse as FileDeleteResponse, FileObjectsLimitOffset as FileObjectsLimitOffset, type FileCreateParams as FileCreateParams, type FileUpdateParams as FileUpdateParams, type FileListParams as FileListParams, };
161
- export { VectorStores as VectorStores, type ExpiresAfter as ExpiresAfter, type FileCounts as FileCounts, type ScoredVectorStoreChunk as ScoredVectorStoreChunk, type VectorStore as VectorStore, type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions, type VectorStoreFileSearchOptions as VectorStoreFileSearchOptions, type VectorStoreDeleteResponse as VectorStoreDeleteResponse, type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse, type VectorStoreSearchResponse as VectorStoreSearchResponse, VectorStoresLimitOffset as VectorStoresLimitOffset, type VectorStoreCreateParams as VectorStoreCreateParams, type VectorStoreUpdateParams as VectorStoreUpdateParams, type VectorStoreListParams as VectorStoreListParams, type VectorStoreQuestionAnsweringParams as VectorStoreQuestionAnsweringParams, type VectorStoreSearchParams as VectorStoreSearchParams, };
162
160
  export { Extractions as Extractions };
161
+ export { Embeddings as Embeddings, type EmbeddingCreateParams as EmbeddingCreateParams };
163
162
  export type SearchFilter = API.SearchFilter;
164
163
  export type SearchFilterCondition = API.SearchFilterCondition;
165
164
  }
package/index.d.ts CHANGED
@@ -4,11 +4,10 @@ import * as Errors from "./error.js";
4
4
  import * as Pagination from "./pagination.js";
5
5
  import { type LimitOffsetParams, LimitOffsetResponse } from "./pagination.js";
6
6
  import * as Uploads from "./uploads.js";
7
- import * as EmbeddingsAPI from "./resources/embeddings.js";
8
- import { Embedding, EmbeddingCreateParams, EmbeddingCreateResponse, Embeddings } from "./resources/embeddings.js";
9
7
  import * as API from "./resources/index.js";
10
8
  import * as TopLevelAPI from "./resources/top-level.js";
11
- import { EmbedParams, InfoResponse, RerankParams, RerankResponse } from "./resources/top-level.js";
9
+ import { EmbedParams, Embedding, EmbeddingCreateResponse, InfoResponse, MultiEncodingEmbedding, RerankParams, RerankResponse } from "./resources/top-level.js";
10
+ import { EmbeddingCreateParams, Embeddings } from "./resources/embeddings.js";
12
11
  import { FileCreateParams, FileDeleteResponse, FileListParams, FileObject, FileObjectsLimitOffset, FileUpdateParams, Files } from "./resources/files.js";
13
12
  import { Extractions } from "./resources/extractions/extractions.js";
14
13
  import { Parsing } from "./resources/parsing/parsing.js";
@@ -101,11 +100,11 @@ export declare class Mixedbread extends Core.APIClient {
101
100
  * @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
102
101
  */
103
102
  constructor({ baseURL, apiKey, ...opts }?: ClientOptions);
104
- embeddings: API.Embeddings;
103
+ vectorStores: API.VectorStores;
105
104
  parsing: API.Parsing;
106
105
  files: API.Files;
107
- vectorStores: API.VectorStores;
108
106
  extractions: API.Extractions;
107
+ embeddings: API.Embeddings;
109
108
  /**
110
109
  * Create embeddings for text or images using the specified model, encoding format,
111
110
  * and normalization.
@@ -114,7 +113,7 @@ export declare class Mixedbread extends Core.APIClient {
114
113
  *
115
114
  * Returns: EmbeddingCreateResponse: The response containing the embeddings.
116
115
  */
117
- embed(body: TopLevelAPI.EmbedParams, options?: Core.RequestOptions): Core.APIPromise<EmbeddingsAPI.EmbeddingCreateResponse>;
116
+ embed(body: TopLevelAPI.EmbedParams, options?: Core.RequestOptions): Core.APIPromise<TopLevelAPI.EmbeddingCreateResponse>;
118
117
  /**
119
118
  * Returns service information, including name and version.
120
119
  *
@@ -124,9 +123,9 @@ export declare class Mixedbread extends Core.APIClient {
124
123
  /**
125
124
  * Rerank different kind of documents for a given query.
126
125
  *
127
- * Args: params: RerankingCreateParams: The parameters for reranking.
126
+ * Args: params: RerankParams: The parameters for reranking.
128
127
  *
129
- * Returns: RerankingCreateResponse: The reranked documents for the input query.
128
+ * Returns: RerankResponse: The reranked documents for the input query.
130
129
  */
131
130
  rerank(body: TopLevelAPI.RerankParams, options?: Core.RequestOptions): Core.APIPromise<TopLevelAPI.RerankResponse>;
132
131
  protected defaultQuery(): Core.DefaultQuery | undefined;
@@ -154,12 +153,12 @@ export declare namespace Mixedbread {
154
153
  export type RequestOptions = Core.RequestOptions;
155
154
  export import LimitOffset = Pagination.LimitOffset;
156
155
  export { type LimitOffsetParams as LimitOffsetParams, type LimitOffsetResponse as LimitOffsetResponse };
157
- export { type InfoResponse as InfoResponse, type RerankResponse as RerankResponse, type EmbedParams as EmbedParams, type RerankParams as RerankParams, };
158
- export { Embeddings as Embeddings, type Embedding as Embedding, type EmbeddingCreateResponse as EmbeddingCreateResponse, type EmbeddingCreateParams as EmbeddingCreateParams, };
156
+ export { type Embedding as Embedding, type EmbeddingCreateResponse as EmbeddingCreateResponse, type MultiEncodingEmbedding as MultiEncodingEmbedding, type InfoResponse as InfoResponse, type RerankResponse as RerankResponse, type EmbedParams as EmbedParams, type RerankParams as RerankParams, };
157
+ export { VectorStores as VectorStores, type ExpiresAfter as ExpiresAfter, type FileCounts as FileCounts, type ScoredVectorStoreChunk as ScoredVectorStoreChunk, type VectorStore as VectorStore, type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions, type VectorStoreFileSearchOptions as VectorStoreFileSearchOptions, type VectorStoreDeleteResponse as VectorStoreDeleteResponse, type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse, type VectorStoreSearchResponse as VectorStoreSearchResponse, VectorStoresLimitOffset as VectorStoresLimitOffset, type VectorStoreCreateParams as VectorStoreCreateParams, type VectorStoreUpdateParams as VectorStoreUpdateParams, type VectorStoreListParams as VectorStoreListParams, type VectorStoreQuestionAnsweringParams as VectorStoreQuestionAnsweringParams, type VectorStoreSearchParams as VectorStoreSearchParams, };
159
158
  export { Parsing as Parsing };
160
159
  export { Files as Files, type FileObject as FileObject, type FileDeleteResponse as FileDeleteResponse, FileObjectsLimitOffset as FileObjectsLimitOffset, type FileCreateParams as FileCreateParams, type FileUpdateParams as FileUpdateParams, type FileListParams as FileListParams, };
161
- export { VectorStores as VectorStores, type ExpiresAfter as ExpiresAfter, type FileCounts as FileCounts, type ScoredVectorStoreChunk as ScoredVectorStoreChunk, type VectorStore as VectorStore, type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions, type VectorStoreFileSearchOptions as VectorStoreFileSearchOptions, type VectorStoreDeleteResponse as VectorStoreDeleteResponse, type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse, type VectorStoreSearchResponse as VectorStoreSearchResponse, VectorStoresLimitOffset as VectorStoresLimitOffset, type VectorStoreCreateParams as VectorStoreCreateParams, type VectorStoreUpdateParams as VectorStoreUpdateParams, type VectorStoreListParams as VectorStoreListParams, type VectorStoreQuestionAnsweringParams as VectorStoreQuestionAnsweringParams, type VectorStoreSearchParams as VectorStoreSearchParams, };
162
160
  export { Extractions as Extractions };
161
+ export { Embeddings as Embeddings, type EmbeddingCreateParams as EmbeddingCreateParams };
163
162
  export type SearchFilter = API.SearchFilter;
164
163
  export type SearchFilterCondition = API.SearchFilterCondition;
165
164
  }
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,aAAa,MAAM,wBAAwB,CAAC;AACxD,OAAO,EACL,SAAS,EACT,qBAAqB,EACrB,uBAAuB,EACvB,UAAU,EACX,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,GAAG,MAAM,mBAAmB,CAAC;AACzC,OAAO,KAAK,WAAW,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,EACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EACL,YAAY,EACZ,UAAU,EACV,sBAAsB,EACtB,WAAW,EACX,6BAA6B,EAC7B,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,EAC5B,qBA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ANGED
@@ -30,8 +30,8 @@ const Core = __importStar(require("./core.js"));
30
30
  const Errors = __importStar(require("./error.js"));
31
31
  const Pagination = __importStar(require("./pagination.js"));
32
32
  const Uploads = __importStar(require("./uploads.js"));
33
- const embeddings_1 = require("./resources/embeddings.js");
34
33
  const API = __importStar(require("./resources/index.js"));
34
+ const embeddings_1 = require("./resources/embeddings.js");
35
35
  const files_1 = require("./resources/files.js");
36
36
  const extractions_1 = require("./resources/extractions/extractions.js");
37
37
  const parsing_1 = require("./resources/parsing/parsing.js");
@@ -77,11 +77,11 @@ class Mixedbread extends Core.APIClient {
77
77
  maxRetries: options.maxRetries,
78
78
  fetch: options.fetch,
79
79
  });
80
- this.embeddings = new API.Embeddings(this);
80
+ this.vectorStores = new API.VectorStores(this);
81
81
  this.parsing = new API.Parsing(this);
82
82
  this.files = new API.Files(this);
83
- this.vectorStores = new API.VectorStores(this);
84
83
  this.extractions = new API.Extractions(this);
84
+ this.embeddings = new API.Embeddings(this);
85
85
  this._options = options;
86
86
  this.apiKey = apiKey;
87
87
  }
@@ -107,9 +107,9 @@ class Mixedbread extends Core.APIClient {
107
107
  /**
108
108
  * Rerank different kind of documents for a given query.
109
109
  *
110
- * Args: params: RerankingCreateParams: The parameters for reranking.
110
+ * Args: params: RerankParams: The parameters for reranking.
111
111
  *
112
- * Returns: RerankingCreateResponse: The reranked documents for the input query.
112
+ * Returns: RerankResponse: The reranked documents for the input query.
113
113
  */
114
114
  rerank(body, options) {
115
115
  return this.post('/v1/reranking', { body, ...options });
@@ -146,13 +146,13 @@ Mixedbread.PermissionDeniedError = Errors.PermissionDeniedError;
146
146
  Mixedbread.UnprocessableEntityError = Errors.UnprocessableEntityError;
147
147
  Mixedbread.toFile = Uploads.toFile;
148
148
  Mixedbread.fileFromPath = Uploads.fileFromPath;
149
- Mixedbread.Embeddings = embeddings_1.Embeddings;
149
+ Mixedbread.VectorStores = vector_stores_1.VectorStores;
150
+ Mixedbread.VectorStoresLimitOffset = vector_stores_1.VectorStoresLimitOffset;
150
151
  Mixedbread.Parsing = parsing_1.Parsing;
151
152
  Mixedbread.Files = files_1.Files;
152
153
  Mixedbread.FileObjectsLimitOffset = files_1.FileObjectsLimitOffset;
153
- Mixedbread.VectorStores = vector_stores_1.VectorStores;
154
- Mixedbread.VectorStoresLimitOffset = vector_stores_1.VectorStoresLimitOffset;
155
154
  Mixedbread.Extractions = extractions_1.Extractions;
155
+ Mixedbread.Embeddings = embeddings_1.Embeddings;
156
156
  var uploads_1 = require("./uploads.js");
157
157
  Object.defineProperty(exports, "toFile", { enumerable: true, get: function () { return uploads_1.toFile; } });
158
158
  Object.defineProperty(exports, "fileFromPath", { enumerable: true, get: function () { return uploads_1.fileFromPath; } });
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtF,gDAA+B;AAC/B,mDAAkC;AAClC,4DAA2C;AAE3C,sDAAqC;AAErC,0DAKgC;AAChC,0DAAyC;AAGzC,gDAQ2B;AAC3B,wEAAkE;AAClE,4DAAsD;AACtD,8EAiBiD;AAEjD,MAAM,YAAY,GAAG;IACnB,UAAU,EAAE,4BAA4B;IACxC,KAAK,EAAE,uBAAuB;CAC/B,CAAC;AA2EF;;GAEG;AACH,MAAa,UAAW,SAAQ,IAAI,CAAC,SAAS;IAK5C;;;;;;;;;;;;OAYG;IACH,YAAY,EACV,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAC7C,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAC3C,GAAG,IAAI,KACU,EAAE;QACnB,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,MAAM,IAAI,MAAM,CAAC,eAAe,CAC9B,gMAAgM,CACjM,CAAC;SACH;QAED,MAAM,OAAO,GAAkB;YAC7B,MAAM;YACN,GAAG,IAAI;YACP,OAAO;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AAM,CAAC,cAAc,CAAC;AACvC,0BAAe,GAAG,MAAM,CAAC,eAAe,CAAC;AACzC,8BAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACjD,8BAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACjD,gCAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACrD,mCAAwB,GAAG,MAAM,CAAC,wBAAwB,CAAC;AAE3D,iBAAM,GAAG,OAAO,CAAC,MAAM,CAAC;AACxB,uBAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AAG7C,UAAU,CAAC,YAAY,GAAG,4BAAY,CAAC;AACvC,UAAU,CAAC,uBAAuB,GAAG,uCAAuB,CAAC;AAC7D,UAAU,CAAC,OAAO,GAAG,iBAAO,CAAC;AAC7B,UAAU,CAAC,KAAK,GAAG,aAAK,CAAC;AACzB,UAAU,CAAC,sBAAsB,GAAG,8BAAsB,CAAC;AAC3D,UAAU,CAAC,WAAW,GAAG,yBAAW,CAAC;AACrC,UAAU,CAAC,UAAU,GAAG,uBAAU,CAAC;AAwDnC,wCAAiD;AAAxC,iGAAA,MAAM,OAAA;AAAE,uGAAA,YAAY,OAAA;AAC7B,oCAciB;AAbf,wGAAA,eAAe,OAAA;AACf,iGAAA,QAAQ,OAAA;AACR,2GAAA,kBAAkB,OAAA;AAClB,kHAAA,yBAAyB,OAAA;AACzB,0GAAA,iBAAiB,OAAA;AACjB,sGAAA,aAAa,OAAA;AACb,sGAAA,aAAa,OAAA;AACb,uGAAA,cAAc,OAAA;AACd,wGAAA,eAAe,OAAA;AACf,4GAAA,mBAAmB,OAAA;AACnB,4GAAA,mBAAmB,OAAA;AACnB,8GAAA,qBAAqB,OAAA;AACrB,iHAAA,wBAAwB,OAAA;AAG1B,kBAAe,UAAU,CAAC"}
package/index.mjs CHANGED
@@ -4,8 +4,8 @@ import * as Core from "./core.mjs";
4
4
  import * as Errors from "./error.mjs";
5
5
  import * as Pagination from "./pagination.mjs";
6
6
  import * as Uploads from "./uploads.mjs";
7
- import { Embeddings, } from "./resources/embeddings.mjs";
8
7
  import * as API from "./resources/index.mjs";
8
+ import { Embeddings } from "./resources/embeddings.mjs";
9
9
  import { FileObjectsLimitOffset, Files, } from "./resources/files.mjs";
10
10
  import { Extractions } from "./resources/extractions/extractions.mjs";
11
11
  import { Parsing } from "./resources/parsing/parsing.mjs";
@@ -51,11 +51,11 @@ export class Mixedbread extends Core.APIClient {
51
51
  maxRetries: options.maxRetries,
52
52
  fetch: options.fetch,
53
53
  });
54
- this.embeddings = new API.Embeddings(this);
54
+ this.vectorStores = new API.VectorStores(this);
55
55
  this.parsing = new API.Parsing(this);
56
56
  this.files = new API.Files(this);
57
- this.vectorStores = new API.VectorStores(this);
58
57
  this.extractions = new API.Extractions(this);
58
+ this.embeddings = new API.Embeddings(this);
59
59
  this._options = options;
60
60
  this.apiKey = apiKey;
61
61
  }
@@ -81,9 +81,9 @@ export class Mixedbread extends Core.APIClient {
81
81
  /**
82
82
  * Rerank different kind of documents for a given query.
83
83
  *
84
- * Args: params: RerankingCreateParams: The parameters for reranking.
84
+ * Args: params: RerankParams: The parameters for reranking.
85
85
  *
86
- * Returns: RerankingCreateResponse: The reranked documents for the input query.
86
+ * Returns: RerankResponse: The reranked documents for the input query.
87
87
  */
88
88
  rerank(body, options) {
89
89
  return this.post('/v1/reranking', { body, ...options });
@@ -119,13 +119,13 @@ Mixedbread.PermissionDeniedError = Errors.PermissionDeniedError;
119
119
  Mixedbread.UnprocessableEntityError = Errors.UnprocessableEntityError;
120
120
  Mixedbread.toFile = Uploads.toFile;
121
121
  Mixedbread.fileFromPath = Uploads.fileFromPath;
122
- Mixedbread.Embeddings = Embeddings;
122
+ Mixedbread.VectorStores = VectorStores;
123
+ Mixedbread.VectorStoresLimitOffset = VectorStoresLimitOffset;
123
124
  Mixedbread.Parsing = Parsing;
124
125
  Mixedbread.Files = Files;
125
126
  Mixedbread.FileObjectsLimitOffset = FileObjectsLimitOffset;
126
- Mixedbread.VectorStores = VectorStores;
127
- Mixedbread.VectorStoresLimitOffset = VectorStoresLimitOffset;
128
127
  Mixedbread.Extractions = Extractions;
128
+ Mixedbread.Embeddings = Embeddings;
129
129
  export { toFile, fileFromPath } from "./uploads.mjs";
130
130
  export { MixedbreadError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./error.mjs";
131
131
  export default Mixedbread;
package/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,KAAK,IAAI;OACT,KAAK,MAAM;OACX,KAAK,UAAU;OAEf,KAAK,OAAO;OAEZ,EAIL,UAAU,GACX;OACM,KAAK,GAAG;OAGR,EAKL,sBAAsB,EAEtB,KAAK,GACN;OACM,EAAE,WAAW,EAAE;OACf,EAAE,OAAO,EAAE;OACX,EAeL,YAAY,EACZ,uBAAuB,GACxB;AAED,MAAM,YAAY,GAAG;IACnB,UAAU,EAAE,4BAA4B;IACxC,KAAK,EAAE,uBAAuB;CAC/B,CAAC;AA2EF;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,IAAI,CAAC,SAAS;IAK5C;;;;;;;;;;;;OAYG;IACH,YAAY,EACV,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAC7C,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAC3C,GAAG,IAAI,KACU,EAAE;QACnB,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,MAAM,IAAI,MAAM,CAAC,eAAe,CAC9B,gMAAgM,CACjM,CAAC;SACH;QAED,MAAM,OAAO,GAAkB;YAC7B,MAAM;YACN,GAAG,IAAI;YACP,OAAO;YACP,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,YAAY;SAC9C,CAAC;QAEF,IAAI,OAAO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AAG,OAAO,CAAC,MAAM,CAAC;AACxB,uBAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AAG7C,UAAU,CAAC,YAAY,GAAG,YAAY,CAAC;AACvC,UAAU,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;AAC7D,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;AAC7B,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC;AACzB,UAAU,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;AAC3D,UAAU,CAAC,WAAW,GAAG,WAAW,CAAC;AACrC,UAAU,CAAC,UAAU,GAAG,UAAU,CAAC;OAwD5B,EAAE,MAAM,EAAE,YAAY,EAAE;OACxB,EACL,eAAe,EACf,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB;AAED,eAAe,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mixedbread/sdk",
3
- "version": "0.1.0-alpha.19",
3
+ "version": "0.1.0-alpha.22",
4
4
  "description": "The official TypeScript library for the Mixedbread API",
5
5
  "author": "Mixedbread <support@mixedbread.com>",
6
6
  "types": "./index.d.ts",
@@ -1,5 +1,6 @@
1
1
  import { APIResource } from "../resource.js";
2
2
  import * as Core from "../core.js";
3
+ import * as TopLevelAPI from "./top-level.js";
3
4
  export declare class Embeddings extends APIResource {
4
5
  /**
5
6
  * Create embeddings for text or images using the specified model, encoding format,
@@ -9,99 +10,7 @@ export declare class Embeddings extends APIResource {
9
10
  *
10
11
  * Returns: EmbeddingCreateResponse: The response containing the embeddings.
11
12
  */
12
- create(body: EmbeddingCreateParams, options?: Core.RequestOptions): Core.APIPromise<EmbeddingCreateResponse>;
13
- }
14
- export interface Embedding {
15
- /**
16
- * The encoded embedding.
17
- */
18
- embedding: Array<number> | Array<number> | string;
19
- /**
20
- * The index of the embedding.
21
- */
22
- index: number;
23
- /**
24
- * The object type of the embedding.
25
- */
26
- object?: 'embedding';
27
- }
28
- export interface EmbeddingCreateResponse {
29
- /**
30
- * The usage of the model
31
- */
32
- usage: EmbeddingCreateResponse.Usage;
33
- /**
34
- * The model used
35
- */
36
- model: string;
37
- /**
38
- * The created embeddings.
39
- */
40
- data: Array<Embedding> | Array<EmbeddingCreateResponse.UnionMember1>;
41
- /**
42
- * The object type of the response
43
- */
44
- object?: 'list' | 'parsing_job' | 'job' | 'embedding' | 'embedding_dict' | 'rank_result' | 'file' | 'vector_store' | 'vector_store.file' | 'api_key';
45
- /**
46
- * Whether the embeddings are normalized.
47
- */
48
- normalized: boolean;
49
- /**
50
- * The encoding formats of the embeddings.
51
- */
52
- encoding_format: 'float' | 'float16' | 'base64' | 'binary' | 'ubinary' | 'int8' | 'uint8' | Array<'float' | 'float16' | 'base64' | 'binary' | 'ubinary' | 'int8' | 'uint8'>;
53
- /**
54
- * The number of dimensions used for the embeddings.
55
- */
56
- dimensions: number | null;
57
- }
58
- export declare namespace EmbeddingCreateResponse {
59
- /**
60
- * The usage of the model
61
- */
62
- interface Usage {
63
- /**
64
- * The number of tokens used for the prompt
65
- */
66
- prompt_tokens: number;
67
- /**
68
- * The total number of tokens used
69
- */
70
- total_tokens: number;
71
- /**
72
- * The number of tokens used for the completion
73
- */
74
- completion_tokens?: number | null;
75
- }
76
- interface UnionMember1 {
77
- /**
78
- * The encoded embedding data by encoding format.Returned, if more than one
79
- * encoding format is used.
80
- */
81
- embedding: UnionMember1.Embedding;
82
- /**
83
- * The index of the embedding.
84
- */
85
- index: number;
86
- /**
87
- * The object type of the embedding.
88
- */
89
- object?: 'embedding_dict';
90
- }
91
- namespace UnionMember1 {
92
- /**
93
- * The encoded embedding data by encoding format.Returned, if more than one
94
- * encoding format is used.
95
- */
96
- interface Embedding {
97
- float?: Array<number>;
98
- int8?: Array<number>;
99
- uint8?: Array<number>;
100
- binary?: Array<number>;
101
- ubinary?: Array<number>;
102
- base64?: string;
103
- }
104
- }
13
+ create(body: EmbeddingCreateParams, options?: Core.RequestOptions): Core.APIPromise<TopLevelAPI.EmbeddingCreateResponse>;
105
14
  }
106
15
  export interface EmbeddingCreateParams {
107
16
  /**
@@ -131,6 +40,6 @@ export interface EmbeddingCreateParams {
131
40
  encoding_format?: 'float' | 'float16' | 'base64' | 'binary' | 'ubinary' | 'int8' | 'uint8' | Array<'float' | 'float16' | 'base64' | 'binary' | 'ubinary' | 'int8' | 'uint8'>;
132
41
  }
133
42
  export declare namespace Embeddings {
134
- export { type Embedding as Embedding, type EmbeddingCreateResponse as EmbeddingCreateResponse, type EmbeddingCreateParams as EmbeddingCreateParams, };
43
+ export { type EmbeddingCreateParams as EmbeddingCreateParams };
135
44
  }
136
45
  //# sourceMappingURL=embeddings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"embeddings.d.ts","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;OAOG;IACH,MAAM,CACJ,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC;CAG5C;AAED,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAElD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,KAAK,EAAE,uBAAuB,CAAC,KAAK,CAAC;IAErC;;OAEG;IACH,KAAK,EAAE,M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,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAErB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,eAAe,CAAC,EACZ,OAAO,GACP,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,MAAM,GACN,OAAO,GACP,KAAK,CAAC,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACrF;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CAChE"}
@@ -1 +1 @@
1
- {"version":3,"file":"embeddings.js","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;OAOG;IACH,MAAM,CACJ,IAA2B,EAC3B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF;AAfD,gCAeC"}
1
+ {"version":3,"file":"embeddings.js","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAI1C,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;OAOG;IACH,MAAM,CACJ,IAA2B,EAC3B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF;AAfD,gCAeC"}
@@ -1 +1 @@
1
- {"version":3,"file":"embeddings.mjs","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;OAOG;IACH,MAAM,CACJ,IAA2B,EAC3B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF"}
1
+ {"version":3,"file":"embeddings.mjs","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;OAOG;IACH,MAAM,CACJ,IAA2B,EAC3B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF"}
@@ -1,8 +1,8 @@
1
1
  export * from "./shared.js";
2
- export { Embeddings, type Embedding, type EmbeddingCreateResponse, type EmbeddingCreateParams, } from "./embeddings.js";
2
+ export { Embeddings, type EmbeddingCreateParams } from "./embeddings.js";
3
3
  export { Extractions } from "./extractions/extractions.js";
4
4
  export { FileObjectsLimitOffset, Files, type FileObject, type FileDeleteResponse, type FileCreateParams, type FileUpdateParams, type FileListParams, } from "./files.js";
5
5
  export { Parsing } from "./parsing/parsing.js";
6
6
  export { VectorStoresLimitOffset, VectorStores, type ExpiresAfter, type FileCounts, type ScoredVectorStoreChunk, type VectorStore, type VectorStoreChunkSearchOptions, type VectorStoreFileSearchOptions, type VectorStoreDeleteResponse, type VectorStoreQuestionAnsweringResponse, type VectorStoreSearchResponse, type VectorStoreCreateParams, type VectorStoreUpdateParams, type VectorStoreListParams, type VectorStoreQuestionAnsweringParams, type VectorStoreSearchParams, } from "./vector-stores/vector-stores.js";
7
- export { type InfoResponse, type RerankResponse, type EmbedParams, type RerankParams } from "./top-level.js";
7
+ export { type Embedding, type EmbeddingCreateResponse, type MultiEncodingEmbedding, type InfoResponse, type RerankResponse, type EmbedParams, type RerankParams, } from "./top-level.js";
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,OAAO,EACL,UAAU,EACV,KAAK,SAAS,EACd,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,GAC3B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EACL,sBAAsB,EACtB,KAAK,EACL,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,GACpB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,uBAAuB,EACvB,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EACzC,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,kCAAkC,EACvC,KAAK,uBAAuB,GAC7B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EACL,sBAAsB,EACtB,KAAK,EACL,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,GACpB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,uBAAuB,EACvB,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,oCAAoC,EACzC,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,kCAAkC,EACvC,KAAK,uBAAuB,GAC7B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,SAAS,EACd,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,YAAY,GAClB,MAAM,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;AAEtF,8CAAyB;AACzB,8CAKsB;AAJpB,wGAAA,UAAU,OAAA;AAKZ,4DAAwD;AAA/C,0GAAA,WAAW,OAAA;AACpB,oCAQiB;AAPf,+GAAA,sBAAsB,OAAA;AACtB,8FAAA,KAAK,OAAA;AAOP,gDAA4C;AAAnC,kGAAA,OAAO,OAAA;AAChB,kEAiBuC;AAhBrC,wHAAA,uBAAuB,OAAA;AACvB,6GAAA,YAAY,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;AAEtF,8CAAyB;AACzB,8CAAsE;AAA7D,wGAAA,UAAU,OAAA;AACnB,4DAAwD;AAA/C,0GAAA,WAAW,OAAA;AACpB,oCAQiB;AAPf,+GAAA,sBAAsB,OAAA;AACtB,8FAAA,KAAK,OAAA;AAOP,gDAA4C;AAAnC,kGAAA,OAAO,OAAA;AAChB,kEAiBuC;AAhBrC,wHAAA,uBAAuB,OAAA;AACvB,6GAAA,YAAY,OAAA"}
@@ -1,6 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  export * from "./shared.mjs";
3
- export { Embeddings, } from "./embeddings.mjs";
3
+ export { Embeddings } from "./embeddings.mjs";
4
4
  export { Extractions } from "./extractions/extractions.mjs";
5
5
  export { FileObjectsLimitOffset, Files, } from "./files.mjs";
6
6
  export { Parsing } from "./parsing/parsing.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EACL,UAAU,GAIX;OACM,EAAE,WAAW,EAAE;OACf,EACL,sBAAsB,EACtB,KAAK,GAMN;OACM,EAAE,OAAO,EAAE;OACX,EACL,uBAAuB,EACvB,YAAY,GAeb"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,EAAE,UAAU,EAA8B;OAC1C,EAAE,WAAW,EAAE;OACf,EACL,sBAAsB,EACtB,KAAK,GAMN;OACM,EAAE,OAAO,EAAE;OACX,EACL,uBAAuB,EACvB,YAAY,GAeb"}
@@ -1,3 +1,95 @@
1
+ export interface Embedding {
2
+ /**
3
+ * The encoded embedding.
4
+ */
5
+ embedding: Array<number> | Array<number> | string;
6
+ /**
7
+ * The index of the embedding.
8
+ */
9
+ index: number;
10
+ /**
11
+ * The object type of the embedding.
12
+ */
13
+ object?: 'embedding';
14
+ }
15
+ export interface EmbeddingCreateResponse {
16
+ /**
17
+ * The usage of the model
18
+ */
19
+ usage: EmbeddingCreateResponse.Usage;
20
+ /**
21
+ * The model used
22
+ */
23
+ model: string;
24
+ /**
25
+ * The created embeddings.
26
+ */
27
+ data: Array<Embedding> | Array<MultiEncodingEmbedding>;
28
+ /**
29
+ * The object type of the response
30
+ */
31
+ object?: 'list' | 'parsing_job' | 'job' | 'embedding' | 'embedding_dict' | 'rank_result' | 'file' | 'vector_store' | 'vector_store.file' | 'api_key';
32
+ /**
33
+ * Whether the embeddings are normalized.
34
+ */
35
+ normalized: boolean;
36
+ /**
37
+ * The encoding formats of the embeddings.
38
+ */
39
+ encoding_format: 'float' | 'float16' | 'base64' | 'binary' | 'ubinary' | 'int8' | 'uint8' | Array<'float' | 'float16' | 'base64' | 'binary' | 'ubinary' | 'int8' | 'uint8'>;
40
+ /**
41
+ * The number of dimensions used for the embeddings.
42
+ */
43
+ dimensions: number | null;
44
+ }
45
+ export declare namespace EmbeddingCreateResponse {
46
+ /**
47
+ * The usage of the model
48
+ */
49
+ interface Usage {
50
+ /**
51
+ * The number of tokens used for the prompt
52
+ */
53
+ prompt_tokens: number;
54
+ /**
55
+ * The total number of tokens used
56
+ */
57
+ total_tokens: number;
58
+ /**
59
+ * The number of tokens used for the completion
60
+ */
61
+ completion_tokens?: number | null;
62
+ }
63
+ }
64
+ export interface MultiEncodingEmbedding {
65
+ /**
66
+ * The encoded embedding data by encoding format.Returned, if more than one
67
+ * encoding format is used.
68
+ */
69
+ embedding: MultiEncodingEmbedding.Embedding;
70
+ /**
71
+ * The index of the embedding.
72
+ */
73
+ index: number;
74
+ /**
75
+ * The object type of the embedding.
76
+ */
77
+ object?: 'embedding_dict';
78
+ }
79
+ export declare namespace MultiEncodingEmbedding {
80
+ /**
81
+ * The encoded embedding data by encoding format.Returned, if more than one
82
+ * encoding format is used.
83
+ */
84
+ interface Embedding {
85
+ float?: Array<number>;
86
+ int8?: Array<number>;
87
+ uint8?: Array<number>;
88
+ binary?: Array<number>;
89
+ ubinary?: Array<number>;
90
+ base64?: string;
91
+ }
92
+ }
1
93
  /**
2
94
  * Info Pydantic Response Service Message
3
95
  */
@@ -107,7 +199,7 @@ export interface RerankParams {
107
199
  /**
108
200
  * The input documents to rerank.
109
201
  */
110
- input: Array<string | unknown>;
202
+ input: Array<string | unknown | Array<unknown>>;
111
203
  /**
112
204
  * The fields of the documents to rank.
113
205
  */
@@ -122,6 +214,6 @@ export interface RerankParams {
122
214
  return_input?: boolean;
123
215
  }
124
216
  export declare namespace TopLevel {
125
- export { type InfoResponse as InfoResponse, type RerankResponse as RerankResponse, type EmbedParams as EmbedParams, type RerankParams as RerankParams, };
217
+ export { type Embedding as Embedding, type EmbeddingCreateResponse as EmbeddingCreateResponse, type MultiEncodingEmbedding as MultiEncodingEmbedding, type InfoResponse as InfoResponse, type RerankResponse as RerankResponse, type EmbedParams as EmbedParams, type RerankParams as RerankParams, };
126
218
  }
127
219
  //# sourceMappingURL=top-level.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"top-level.d.ts","sourceRoot":"","sources":["../src/resources/top-level.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IAEb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC;IAE5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAEjC;;OAEG;IACH,MAA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AG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACrF;AAED,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAEhD;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAEnC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,YAAY,IAAI,YAAY,GAClC,CAAC;CACH"}
package/src/index.ts CHANGED
@@ -6,16 +6,18 @@ import * as Errors from './error';
6
6
  import * as Pagination from './pagination';
7
7
  import { type LimitOffsetParams, LimitOffsetResponse } from './pagination';
8
8
  import * as Uploads from './uploads';
9
- import * as EmbeddingsAPI from './resources/embeddings';
9
+ import * as API from './resources/index';
10
+ import * as TopLevelAPI from './resources/top-level';
10
11
  import {
12
+ EmbedParams,
11
13
  Embedding,
12
- EmbeddingCreateParams,
13
14
  EmbeddingCreateResponse,
14
- Embeddings,
15
- } from './resources/embeddings';
16
- import * as API from './resources/index';
17
- import * as TopLevelAPI from './resources/top-level';
18
- import { EmbedParams, InfoResponse, RerankParams, RerankResponse } from './resources/top-level';
15
+ InfoResponse,
16
+ MultiEncodingEmbedding,
17
+ RerankParams,
18
+ RerankResponse,
19
+ } from './resources/top-level';
20
+ import { EmbeddingCreateParams, Embeddings } from './resources/embeddings';
19
21
  import {
20
22
  FileCreateParams,
21
23
  FileDeleteResponse,
@@ -182,11 +184,11 @@ export class Mixedbread extends Core.APIClient {
182
184
  this.apiKey = apiKey;
183
185
  }
184
186
 
185
- embeddings: API.Embeddings = new API.Embeddings(this);
187
+ vectorStores: API.VectorStores = new API.VectorStores(this);
186
188
  parsing: API.Parsing = new API.Parsing(this);
187
189
  files: API.Files = new API.Files(this);
188
- vectorStores: API.VectorStores = new API.VectorStores(this);
189
190
  extractions: API.Extractions = new API.Extractions(this);
191
+ embeddings: API.Embeddings = new API.Embeddings(this);
190
192
 
191
193
  /**
192
194
  * Create embeddings for text or images using the specified model, encoding format,
@@ -199,7 +201,7 @@ export class Mixedbread extends Core.APIClient {
199
201
  embed(
200
202
  body: TopLevelAPI.EmbedParams,
201
203
  options?: Core.RequestOptions,
202
- ): Core.APIPromise<EmbeddingsAPI.EmbeddingCreateResponse> {
204
+ ): Core.APIPromise<TopLevelAPI.EmbeddingCreateResponse> {
203
205
  return this.post('/v1/embeddings', { body, ...options });
204
206
  }
205
207
 
@@ -215,9 +217,9 @@ export class Mixedbread extends Core.APIClient {
215
217
  /**
216
218
  * Rerank different kind of documents for a given query.
217
219
  *
218
- * Args: params: RerankingCreateParams: The parameters for reranking.
220
+ * Args: params: RerankParams: The parameters for reranking.
219
221
  *
220
- * Returns: RerankingCreateResponse: The reranked documents for the input query.
222
+ * Returns: RerankResponse: The reranked documents for the input query.
221
223
  */
222
224
  rerank(
223
225
  body: TopLevelAPI.RerankParams,
@@ -262,13 +264,13 @@ export class Mixedbread extends Core.APIClient {
262
264
  static fileFromPath = Uploads.fileFromPath;
263
265
  }
264
266
 
265
- Mixedbread.Embeddings = Embeddings;
267
+ Mixedbread.VectorStores = VectorStores;
268
+ Mixedbread.VectorStoresLimitOffset = VectorStoresLimitOffset;
266
269
  Mixedbread.Parsing = Parsing;
267
270
  Mixedbread.Files = Files;
268
271
  Mixedbread.FileObjectsLimitOffset = FileObjectsLimitOffset;
269
- Mixedbread.VectorStores = VectorStores;
270
- Mixedbread.VectorStoresLimitOffset = VectorStoresLimitOffset;
271
272
  Mixedbread.Extractions = Extractions;
273
+ Mixedbread.Embeddings = Embeddings;
272
274
  export declare namespace Mixedbread {
273
275
  export type RequestOptions = Core.RequestOptions;
274
276
 
@@ -276,31 +278,15 @@ export declare namespace Mixedbread {
276
278
  export { type LimitOffsetParams as LimitOffsetParams, type LimitOffsetResponse as LimitOffsetResponse };
277
279
 
278
280
  export {
281
+ type Embedding as Embedding,
282
+ type EmbeddingCreateResponse as EmbeddingCreateResponse,
283
+ type MultiEncodingEmbedding as MultiEncodingEmbedding,
279
284
  type InfoResponse as InfoResponse,
280
285
  type RerankResponse as RerankResponse,
281
286
  type EmbedParams as EmbedParams,
282
287
  type RerankParams as RerankParams,
283
288
  };
284
289
 
285
- export {
286
- Embeddings as Embeddings,
287
- type Embedding as Embedding,
288
- type EmbeddingCreateResponse as EmbeddingCreateResponse,
289
- type EmbeddingCreateParams as EmbeddingCreateParams,
290
- };
291
-
292
- export { Parsing as Parsing };
293
-
294
- export {
295
- Files as Files,
296
- type FileObject as FileObject,
297
- type FileDeleteResponse as FileDeleteResponse,
298
- FileObjectsLimitOffset as FileObjectsLimitOffset,
299
- type FileCreateParams as FileCreateParams,
300
- type FileUpdateParams as FileUpdateParams,
301
- type FileListParams as FileListParams,
302
- };
303
-
304
290
  export {
305
291
  VectorStores as VectorStores,
306
292
  type ExpiresAfter as ExpiresAfter,
@@ -320,8 +306,22 @@ export declare namespace Mixedbread {
320
306
  type VectorStoreSearchParams as VectorStoreSearchParams,
321
307
  };
322
308
 
309
+ export { Parsing as Parsing };
310
+
311
+ export {
312
+ Files as Files,
313
+ type FileObject as FileObject,
314
+ type FileDeleteResponse as FileDeleteResponse,
315
+ FileObjectsLimitOffset as FileObjectsLimitOffset,
316
+ type FileCreateParams as FileCreateParams,
317
+ type FileUpdateParams as FileUpdateParams,
318
+ type FileListParams as FileListParams,
319
+ };
320
+
323
321
  export { Extractions as Extractions };
324
322
 
323
+ export { Embeddings as Embeddings, type EmbeddingCreateParams as EmbeddingCreateParams };
324
+
325
325
  export type SearchFilter = API.SearchFilter;
326
326
  export type SearchFilterCondition = API.SearchFilterCondition;
327
327
  }
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../resource';
4
4
  import * as Core from '../core';
5
+ import * as TopLevelAPI from './top-level';
5
6
 
6
7
  export class Embeddings extends APIResource {
7
8
  /**
@@ -15,143 +16,11 @@ export class Embeddings extends APIResource {
15
16
  create(
16
17
  body: EmbeddingCreateParams,
17
18
  options?: Core.RequestOptions,
18
- ): Core.APIPromise<EmbeddingCreateResponse> {
19
+ ): Core.APIPromise<TopLevelAPI.EmbeddingCreateResponse> {
19
20
  return this._client.post('/v1/embeddings', { body, ...options });
20
21
  }
21
22
  }
22
23
 
23
- export interface Embedding {
24
- /**
25
- * The encoded embedding.
26
- */
27
- embedding: Array<number> | Array<number> | string;
28
-
29
- /**
30
- * The index of the embedding.
31
- */
32
- index: number;
33
-
34
- /**
35
- * The object type of the embedding.
36
- */
37
- object?: 'embedding';
38
- }
39
-
40
- export interface EmbeddingCreateResponse {
41
- /**
42
- * The usage of the model
43
- */
44
- usage: EmbeddingCreateResponse.Usage;
45
-
46
- /**
47
- * The model used
48
- */
49
- model: string;
50
-
51
- /**
52
- * The created embeddings.
53
- */
54
- data: Array<Embedding> | Array<EmbeddingCreateResponse.UnionMember1>;
55
-
56
- /**
57
- * The object type of the response
58
- */
59
- object?:
60
- | 'list'
61
- | 'parsing_job'
62
- | 'job'
63
- | 'embedding'
64
- | 'embedding_dict'
65
- | 'rank_result'
66
- | 'file'
67
- | 'vector_store'
68
- | 'vector_store.file'
69
- | 'api_key';
70
-
71
- /**
72
- * Whether the embeddings are normalized.
73
- */
74
- normalized: boolean;
75
-
76
- /**
77
- * The encoding formats of the embeddings.
78
- */
79
- encoding_format:
80
- | 'float'
81
- | 'float16'
82
- | 'base64'
83
- | 'binary'
84
- | 'ubinary'
85
- | 'int8'
86
- | 'uint8'
87
- | Array<'float' | 'float16' | 'base64' | 'binary' | 'ubinary' | 'int8' | 'uint8'>;
88
-
89
- /**
90
- * The number of dimensions used for the embeddings.
91
- */
92
- dimensions: number | null;
93
- }
94
-
95
- export namespace EmbeddingCreateResponse {
96
- /**
97
- * The usage of the model
98
- */
99
- export interface Usage {
100
- /**
101
- * The number of tokens used for the prompt
102
- */
103
- prompt_tokens: number;
104
-
105
- /**
106
- * The total number of tokens used
107
- */
108
- total_tokens: number;
109
-
110
- /**
111
- * The number of tokens used for the completion
112
- */
113
- completion_tokens?: number | null;
114
- }
115
-
116
- export interface UnionMember1 {
117
- /**
118
- * The encoded embedding data by encoding format.Returned, if more than one
119
- * encoding format is used.
120
- */
121
- embedding: UnionMember1.Embedding;
122
-
123
- /**
124
- * The index of the embedding.
125
- */
126
- index: number;
127
-
128
- /**
129
- * The object type of the embedding.
130
- */
131
- object?: 'embedding_dict';
132
- }
133
-
134
- export namespace UnionMember1 {
135
- /**
136
- * The encoded embedding data by encoding format.Returned, if more than one
137
- * encoding format is used.
138
- */
139
- export interface Embedding {
140
- float?: Array<number>;
141
-
142
- int8?: Array<number>;
143
-
144
- uint8?: Array<number>;
145
-
146
- binary?: Array<number>;
147
-
148
- ubinary?: Array<number>;
149
-
150
- base64?: string;
151
- }
152
- }
153
- }
154
-
155
24
  export interface EmbeddingCreateParams {
156
25
  /**
157
26
  * The model to use for creating embeddings.
@@ -194,9 +63,5 @@ export interface EmbeddingCreateParams {
194
63
  }
195
64
 
196
65
  export declare namespace Embeddings {
197
- export {
198
- type Embedding as Embedding,
199
- type EmbeddingCreateResponse as EmbeddingCreateResponse,
200
- type EmbeddingCreateParams as EmbeddingCreateParams,
201
- };
66
+ export { type EmbeddingCreateParams as EmbeddingCreateParams };
202
67
  }
@@ -1,12 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  export * from './shared';
4
- export {
5
- Embeddings,
6
- type Embedding,
7
- type EmbeddingCreateResponse,
8
- type EmbeddingCreateParams,
9
- } from './embeddings';
4
+ export { Embeddings, type EmbeddingCreateParams } from './embeddings';
10
5
  export { Extractions } from './extractions/extractions';
11
6
  export {
12
7
  FileObjectsLimitOffset,
@@ -36,4 +31,12 @@ export {
36
31
  type VectorStoreQuestionAnsweringParams,
37
32
  type VectorStoreSearchParams,
38
33
  } from './vector-stores/vector-stores';
39
- export { type InfoResponse, type RerankResponse, type EmbedParams, type RerankParams } from './top-level';
34
+ export {
35
+ type Embedding,
36
+ type EmbeddingCreateResponse,
37
+ type MultiEncodingEmbedding,
38
+ type InfoResponse,
39
+ type RerankResponse,
40
+ type EmbedParams,
41
+ type RerankParams,
42
+ } from './top-level';
@@ -1,5 +1,137 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ export interface Embedding {
4
+ /**
5
+ * The encoded embedding.
6
+ */
7
+ embedding: Array<number> | Array<number> | string;
8
+
9
+ /**
10
+ * The index of the embedding.
11
+ */
12
+ index: number;
13
+
14
+ /**
15
+ * The object type of the embedding.
16
+ */
17
+ object?: 'embedding';
18
+ }
19
+
20
+ export interface EmbeddingCreateResponse {
21
+ /**
22
+ * The usage of the model
23
+ */
24
+ usage: EmbeddingCreateResponse.Usage;
25
+
26
+ /**
27
+ * The model used
28
+ */
29
+ model: string;
30
+
31
+ /**
32
+ * The created embeddings.
33
+ */
34
+ data: Array<Embedding> | Array<MultiEncodingEmbedding>;
35
+
36
+ /**
37
+ * The object type of the response
38
+ */
39
+ object?:
40
+ | 'list'
41
+ | 'parsing_job'
42
+ | 'job'
43
+ | 'embedding'
44
+ | 'embedding_dict'
45
+ | 'rank_result'
46
+ | 'file'
47
+ | 'vector_store'
48
+ | 'vector_store.file'
49
+ | 'api_key';
50
+
51
+ /**
52
+ * Whether the embeddings are normalized.
53
+ */
54
+ normalized: boolean;
55
+
56
+ /**
57
+ * The encoding formats of the embeddings.
58
+ */
59
+ encoding_format:
60
+ | 'float'
61
+ | 'float16'
62
+ | 'base64'
63
+ | 'binary'
64
+ | 'ubinary'
65
+ | 'int8'
66
+ | 'uint8'
67
+ | Array<'float' | 'float16' | 'base64' | 'binary' | 'ubinary' | 'int8' | 'uint8'>;
68
+
69
+ /**
70
+ * The number of dimensions used for the embeddings.
71
+ */
72
+ dimensions: number | null;
73
+ }
74
+
75
+ export namespace EmbeddingCreateResponse {
76
+ /**
77
+ * The usage of the model
78
+ */
79
+ export interface Usage {
80
+ /**
81
+ * The number of tokens used for the prompt
82
+ */
83
+ prompt_tokens: number;
84
+
85
+ /**
86
+ * The total number of tokens used
87
+ */
88
+ total_tokens: number;
89
+
90
+ /**
91
+ * The number of tokens used for the completion
92
+ */
93
+ completion_tokens?: number | null;
94
+ }
95
+ }
96
+
97
+ export interface MultiEncodingEmbedding {
98
+ /**
99
+ * The encoded embedding data by encoding format.Returned, if more than one
100
+ * encoding format is used.
101
+ */
102
+ embedding: MultiEncodingEmbedding.Embedding;
103
+
104
+ /**
105
+ * The index of the embedding.
106
+ */
107
+ index: number;
108
+
109
+ /**
110
+ * The object type of the embedding.
111
+ */
112
+ object?: 'embedding_dict';
113
+ }
114
+
115
+ export namespace MultiEncodingEmbedding {
116
+ /**
117
+ * The encoded embedding data by encoding format.Returned, if more than one
118
+ * encoding format is used.
119
+ */
120
+ export interface Embedding {
121
+ float?: Array<number>;
122
+
123
+ int8?: Array<number>;
124
+
125
+ uint8?: Array<number>;
126
+
127
+ binary?: Array<number>;
128
+
129
+ ubinary?: Array<number>;
130
+
131
+ base64?: string;
132
+ }
133
+ }
134
+
3
135
  /**
4
136
  * Info Pydantic Response Service Message
5
137
  */
@@ -150,7 +282,7 @@ export interface RerankParams {
150
282
  /**
151
283
  * The input documents to rerank.
152
284
  */
153
- input: Array<string | unknown>;
285
+ input: Array<string | unknown | Array<unknown>>;
154
286
 
155
287
  /**
156
288
  * The fields of the documents to rank.
@@ -170,6 +302,9 @@ export interface RerankParams {
170
302
 
171
303
  export declare namespace TopLevel {
172
304
  export {
305
+ type Embedding as Embedding,
306
+ type EmbeddingCreateResponse as EmbeddingCreateResponse,
307
+ type MultiEncodingEmbedding as MultiEncodingEmbedding,
173
308
  type InfoResponse as InfoResponse,
174
309
  type RerankResponse as RerankResponse,
175
310
  type EmbedParams as EmbedParams,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0-alpha.19'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.22'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-alpha.19";
1
+ export declare const VERSION = "0.1.0-alpha.22";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.1.0-alpha.19'; // x-release-please-version
4
+ exports.VERSION = '0.1.0-alpha.22'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.1.0-alpha.19'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.22'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map