npm openai 4.0.0
v4.0.0

latest releases: 4.71.1, 4.71.0, 4.70.3...
14 months ago

Version 4 is a complete rewrite of the SDK, offering a huge set of improvements.

What's new

  • Streaming support for completions and chat completions!
  • Improved typescript types for responses & errors
  • Support for ESM, CloudFlare Workers, Vercel edge functions, Deno, and more
  • Better file upload API for Whisper, fine-tune files, & DALL·E images
  • Improved error handling through automatic retries & error classes
  • Improved latency through reusing TCP connections
  • Simpler initialization logic

Getting started

npm install openai@4.0.0

Migration guide

➡️ View the v3 to v4 migration guide

Don't miss a new openai release

NewReleases is sending notifications on new releases.