Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supabase Deno Edge Function OpenAI.Configuration #960

Open
charlesanim opened this issue Dec 25, 2024 · 0 comments
Open

Supabase Deno Edge Function OpenAI.Configuration #960

charlesanim opened this issue Dec 25, 2024 · 0 comments
Labels
deno Not working in Deno

Comments

@charlesanim
Copy link

Failing module

import OpenAI from 'https://esm.sh/[email protected]';

export class SomeClass {
  private openai: OpenAI;

  constructor(apiKey: string) {
    this.openai = new OpenAI(
      new OpenAI.Configuration({ apiKey })
    );
  }

Error message

After running deno run I got this:

{"error":"OpenAI.Configuration is not a constructor"}%  

Additional info

  • Deno version: Latest
@charlesanim charlesanim added the deno Not working in Deno label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deno Not working in Deno
Projects
None yet
Development

No branches or pull requests

1 participant