HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
openai
openai-node
TypeScript2022–2026
openai / openai-node

openai-node

Official JavaScript / TypeScript library for the OpenAI API

7Distinct people
11Mentions
0Explicit recommenders
11.3KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Official JavaScript / TypeScript library for the OpenAI API

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year11 dated mentions

Observed mentions: 2022-04-30 20:32:53 UTC to 2026-05-18 19:30:08 UTC.

012342022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 4 mentions; 2 submissions, 2 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments20242025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC422
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC413
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC000
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC202

What Hacker News says

11 sources
punkpeye·Oct 16, 2024Submission

Ask HN: Any existing Node.js frameworks that give basic LLMs access to tools?

Basically what's described here: * https://github.com/openai/openai-node?tab=readme-ov-file#automated-function-calls * https://jrmyphlmn.com/posts/sequential-function-calls Suppose I have a model that does not natively support this. Has anyone written/came across a library that implements such logic? Conceptually, I would imagine that it simply boils down to another LLM interpreting user's question. The prompt for that LLM includes instructions that explain access to tools it has. That LLM then responds with a plan of execution. The plan is some JSON with instructions of what to execute. After the first cycle, the plan is re-evaluated. This repeats until LLM is happy with the response. In practice, this feels like _a lot_ of edge cases to handle, so I am wondering if there are existing abstractions that I could use here. For context, I am
Read the rest
not using the native `tools` functionality provided by OpenAI SDK because it does not provide enough flexibility. It is a black box approach. I need to have more granular level control over when tools should be used/which.
1 points · Open discussion
This is the code that does the work: https://github.com/rectanglehq/Shapeshift/blob/d954dab2a866c... There are a few ways this could be made a less expensive to run: 1. Cache those embeddings somewhere. You're only embedding simple strings like "name" and "address" - no need to do that work more than once in an entire lifetime of running the tool. 2. As suggested here https://news.ycombinator.com/item?id=40973028 change the design of the tool so instead of doing the work it returns a reusable data structure mapping input keys to output keys, so you only have to run it once and can then use that generated data structure to apply the transformations on large amounts of data in the future. 3. Since so many of the keys are going to have predictable names ("name", "address" etc) you could even pre-calculate embeddings for the 1,000 most common
Read the rest
keys across all three embedding providers and ship those as part of the package. Also: in https://github.com/rectanglehq/Shapeshift/blob/d954dab2a866c... you're using Promise.map() to run multiple embeddings through the OpenAI API at once, which risks tripping their rate-limit. You should be able to pass the text as an array in a single call instead, something like this: const response = await this.openai!.embeddings.create({ model: this.embeddingModel, input: texts, encoding_format: "float", }); return response.data.map(item => item.embedding); https://platform.openai.com/docs/api-reference/embeddings/cr... says input can be a string OR an array - that's reflected in the TypeScript library here too: https://github.com/openai/openai-node/blob/5873a017f0f2040ef...
In Shapeshift: Semantically map JSON objects using key-level vector embeddings
We try to keep it to a minimum, especially in JS (though we have some nice improvements coming soon when we deprecate node-fetch in favor of built-in fetch). The package sizes aren't tiny because we include thorough types and sourcemaps, but the bundle sizes are fairly tidy. Here's an example of a typical RESTful endpoint (Lithic's `client.cards.create()`: https://github.com/lithic-com/lithic-node/blob/36d4a6a70597e... Here are some example repos produced by Stainless: 1. https://github.com/openai/openai-node 2. https://github.com/openai/openai-python 3. https://github.com/cloudflare/cloudflare-go 4. https://github.com/Modern-Treasury/modern-treasury-java
In The Stainless SDK Generator
We have a bit of context about this in the readme: https://github.com/lastmile-ai/aiconfig#what-problem-it-solv.... The main issue with keeping it in code is that it tangles application code with prompts and model-specific logic. That makes it hard to evaluate the genAI parts of the application, and also iterating on the prompts is not as straightforward as opening up a playground. Having the config be the source of truth let's you connect it to your application code (and still source controlled), lets you evaluate the config as the AI artifact, and also lets you open the config in a playground to edit and iterate. For example, compare how much simpler openai function calling becomes with storing the stuff as a config: https://github.com/lastmile-ai/aiconfig/blob/main/cookbooks/... vs using vanilla openai directly (https://github.com/open
Read the rest
In AIConfig – source control format for gen AI prompts, models and settings
zachkirsch·Mar 9, 2023Submission

Show HN: 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. 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
Read the rest
5 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.