openai = {
const { OpenAIApi, Configuration } = openai_module;
const apiKey = API_KEY || openaiApiKey;
if (!apiKey) {
throw new Error(
"The @osteele/openai-wrapper module must be imported with a `with` statement. See that notebook for usage instructions."
);
}
const configuration = new Configuration({ apiKey });
return new OpenAIApi(configuration);
}