dexaai/openai-fetch

The official openai package no longer uses axios

Closed this issue · 2 comments

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).

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

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