HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
rectanglehq
Shapeshift
TypeScript2024–2024
rectanglehq / Shapeshift

Shapeshift

Transform JSON objects using vector embeddings

2Distinct people
2Mentions
0Explicit recommenders
427GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Transform JSON objects using vector embeddings

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

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 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 hour2 dated mentions

Observed mentions: 2024-07-15 22:47:23 UTC to 2024-07-16 02:36:40 UTC.

012024-07-15 22:00:00 UTC to 2024-07-15 23:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsJul 15, 22:002024-07-15 23:00:00 UTC to 2024-07-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-07-16 00:00:00 UTC to 2024-07-16 01:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsJul 16, 00:002024-07-16 01:00:00 UTC to 2024-07-16 02:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-07-16 02:00:00 UTC to 2024-07-16 03:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJul 16, 02:00

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
Jul 15, 22:002024-07-15 22:00:00 UTC2024-07-15 23:00:00 UTC110
Jul 15, 23:002024-07-15 23:00:00 UTC2024-07-16 00:00:00 UTC000
Jul 16, 00:002024-07-16 00:00:00 UTC2024-07-16 01:00:00 UTC000
Jul 16, 01:002024-07-16 01:00:00 UTC2024-07-16 02:00:00 UTC000
Jul 16, 02:002024-07-16 02:00:00 UTC2024-07-16 03:00:00 UTC101

What Hacker News says

2 sources
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

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.