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

The official openai package no longer uses axios #34

Closed
rattrayalex opened this issue Nov 3, 2023 · 2 comments
Closed

The official openai package no longer uses axios #34

rattrayalex opened this issue Nov 3, 2023 · 2 comments

Comments

@rattrayalex
Copy link

rattrayalex commented Nov 3, 2023

The README on this project says this:

Unfortunately, the official openai-node uses Axios, which only supports Node and is bloated.

Reasons to consider using openai-fetch:
Supports all envs with native fetch: Node 18+, browsers, Deno, Cloudflare Workers, etc

As of https://github.com/openai/openai-node/releases/tag/v4.0.0, openai uses the native fetch by default in Deno, Cloudflare workers, etc. It does use node-fetch in Node 18+, though may be moving to undici there soon.

The package download size stats may have changed as well, though most of the size of the official package is types, sourcemaps, etc which aren't imported at runtime. The runtime impact is usually around 25kb (still larger than this package).

@rattrayalex
Copy link
Author

If there's anything still missing from the openai package that you'd like to see, please do let me know!

@rileytomasek
Copy link
Collaborator

This is updated on the v2 branch which will be merged soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants