index.js 435 B

1234567891011121314151617
  1. /**
  2. * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
  3. */
  4. const shims = require('./registry');
  5. const auto = require('openai/_shims/auto/runtime');
  6. exports.init = () => {
  7. if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
  8. };
  9. for (const property of Object.keys(shims)) {
  10. Object.defineProperty(exports, property, {
  11. get() {
  12. return shims[property];
  13. },
  14. });
  15. }
  16. exports.init();