embeddings.cjs 788 B

123456789101112131415161718192021222324
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.Embeddings = void 0;
  4. const async_caller_js_1 = require("./utils/async_caller.cjs");
  5. /**
  6. * An abstract class that provides methods for embedding documents and
  7. * queries using LangChain.
  8. */
  9. class Embeddings {
  10. constructor(params) {
  11. /**
  12. * The async caller should be used by subclasses to make any async calls,
  13. * which will thus benefit from the concurrency and retry logic.
  14. */
  15. Object.defineProperty(this, "caller", {
  16. enumerable: true,
  17. configurable: true,
  18. writable: true,
  19. value: void 0
  20. });
  21. this.caller = new async_caller_js_1.AsyncCaller(params ?? {});
  22. }
  23. }
  24. exports.Embeddings = Embeddings;