@kreuzberg/node 4.7.4 → 4.8.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/dist/index.mjs CHANGED
@@ -145,6 +145,7 @@ var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => {
145
145
  ErrorCode2[ErrorCode2["ParsingError"] = 5] = "ParsingError";
146
146
  ErrorCode2[ErrorCode2["OcrError"] = 6] = "OcrError";
147
147
  ErrorCode2[ErrorCode2["MissingDependency"] = 7] = "MissingDependency";
148
+ ErrorCode2[ErrorCode2["Embedding"] = 8] = "Embedding";
148
149
  return ErrorCode2;
149
150
  })(ErrorCode || {});
150
151
  var KreuzbergError = class _KreuzbergError extends Error {
@@ -231,6 +232,13 @@ var MissingDependencyError = class _MissingDependencyError extends KreuzbergErro
231
232
  Object.setPrototypeOf(this, _MissingDependencyError.prototype);
232
233
  }
233
234
  };
235
+ var EmbeddingError = class _EmbeddingError extends KreuzbergError {
236
+ constructor(message, panicContext) {
237
+ super(message, panicContext);
238
+ this.name = "EmbeddingError";
239
+ Object.setPrototypeOf(this, _EmbeddingError.prototype);
240
+ }
241
+ };
234
242
 
235
243
  // typescript/core/assertions.ts
236
244
  function assertUint8Array(value, name) {
@@ -1153,11 +1161,20 @@ function getEmbeddingPreset(name) {
1153
1161
  const result = binding2.getEmbeddingPreset(name);
1154
1162
  return result;
1155
1163
  }
1164
+ function embedSync(texts, config) {
1165
+ const binding2 = getBinding();
1166
+ return binding2.embedSync(texts, config ?? null);
1167
+ }
1168
+ async function embed(texts, config) {
1169
+ const binding2 = getBinding();
1170
+ return binding2.embed(texts, config ?? null);
1171
+ }
1156
1172
 
1157
1173
  // typescript/index.ts
1158
- var __version__ = "4.7.4";
1174
+ var __version__ = "4.8.0";
1159
1175
  export {
1160
1176
  CacheError,
1177
+ EmbeddingError,
1161
1178
  ErrorCode,
1162
1179
  ExtractionConfig,
1163
1180
  ImageProcessingError,
@@ -1185,6 +1202,8 @@ export {
1185
1202
  createWorkerPool,
1186
1203
  detectMimeType,
1187
1204
  detectMimeTypeFromPath,
1205
+ embed,
1206
+ embedSync,
1188
1207
  extractBytes,
1189
1208
  extractBytesSync,
1190
1209
  extractFile,