Skip to content

chat.completions.create return null on browser #232

Closed
@aleluff

Description

@aleluff

Confirm this is a Node library issue and not an underlying OpenAI API issue

  • This is an issue with the Node library

Describe the bug

While developing an web app on localhost
Works like a charm with 3.6 but after upgrading to v4 and adapating the code

chat.completions.create return always null with dangerouslyAllowBrowser: true

Works well in back with the same code

To Reproduce

  1. Use demo code in browser
  2. Add dangerouslyAllowBrowser to initiator option
  3. Run and get error

Code snippets

No response

OS

macOS

Node version

Node v18.16

Library version

openai v4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions