in src/_shims/registry.ts [42:65]
export function setShims(shims: Shims, options: { auto: boolean } = { auto: false }) {
if (auto) {
throw new Error(
`you must \`import 'openai/shims/${shims.kind}'\` before importing anything else from openai`,
);
}
if (kind) {
throw new Error(`can't \`import 'openai/shims/${shims.kind}'\` after \`import 'openai/shims/${kind}'\``);
}
auto = options.auto;
kind = shims.kind;
fetch = shims.fetch;
Request = shims.Request;
Response = shims.Response;
Headers = shims.Headers;
FormData = shims.FormData;
Blob = shims.Blob;
File = shims.File;
ReadableStream = shims.ReadableStream;
getMultipartRequestOptions = shims.getMultipartRequestOptions;
getDefaultAgent = shims.getDefaultAgent;
fileFromPath = shims.fileFromPath;
isFsReadStream = shims.isFsReadStream;
}