Version 4 is a complete rewrite of the SDK, offering a huge set of improvements.
- 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
Now I suspect this is important but I’m not sure why. Does it mean I need to migrate all my .js files that use OpenAI?