An auto-generated OpenAI Node SDK that's better than the official one
Some part of the OpenAI API can stream events, like the “chat completion” endpoint that’s used by ChatGPT to type out its response. However, the official OpenAI Node SDK doesn’t natively support streaming [1] (though it’s the most requested feature [2]). The recommended approach [3] is kind of a nightmare. I used Fern [4] to generate an SDK for the OpenAI API. It makes it a lot easier to stream responses! https://github.com/fern-openai/openai-node#streaming There’s some other niceties of the Fern-generated SDK: - Endpoints organized by resource, e.g.…
What it does
In the maker’s words, at launch
Some part of the OpenAI API can stream events, like the “chat completion” endpoint that’s used by ChatGPT to type out its response. However, the official OpenAI Node SDK doesn’t natively support streaming [1] (though it’s the most requested feature [2]). The recommended approach [3] is kind of a nightmare. I used Fern [4] to generate an SDK for the OpenAI API. It makes it a lot easier to stream responses! https://github.com/fern-openai/openai-node#streaming There’s some other niceties of the Fern-generated SDK: - Endpoints organized by resource, e.g. client.audio.transcribe(...) - Properties are camelCase to match JS/TS convention (they are snake_case in OpenAI’s SDK) - The file upload endpoints support Node.js ReadStream, rather than just File [1] https://github.com/openai/openai-node [2] https://github.com/openai/openai-node/issues?q=is%3Aissue+is... [3] https://github.com/openai/openai-node#streaming-completions [4] https://github.com/fern-api/fern
Does the same job
all alternatives →


Chat Interface for OpenAI Assistants2024 · ▲119ChatGPT-like customer interactions in a website widget


More dev tools this month
the category →



Open-source GTM skills for technical founders
Dev tools · 29d ago · gtmcofounder.com

OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.
Dev tools · 2d ago · opentrailpaper.com

Launched alongside, March 2023
the whole month →




- BI
I'm a big fan of the BBC podcast In Our Time -- and (like most people) I've been playing with the OpenAI APIs. In Our Time has almost 1,000 episodes on everything from Cleopatra to the evolution of teeth to plasma physics, all still available, so it's my starting point to learn about most topics. But it's not well organised. So here are the episodes sorted by library code. It's fun to explore. Web scraping is usually pretty tedious, but I found that I could send the minimised HTML to GPT-3 and get (almost) perfect JSON back: the prompt includes the Typescript definition. At the same time I…
AI · 2023 · genmon.github.io