-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7088a85
commit edaf2d4
Showing
10 changed files
with
1,289 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# LangChainJS x TurboPuffer | ||
|
||
This is a 3rd party integration of [TurboPuffer](https://turbopuffer.com/) as a Vector Store class into the [LangChain](https://langchain.org/) ecosystem. | ||
|
||
Turbopuffer is a vector store built ontop of object storage so it is remarkably cheap and scalable. | ||
|
||
Python is always going to come first as an official version so I thought I'd make a JS version for the community. | ||
|
||
## Installation | ||
|
||
```bash | ||
npm install langchain-turbopuffer | ||
``` | ||
|
||
or if you use pnpm | ||
|
||
```bash | ||
pnpm install langchain-turbopuffer | ||
``` | ||
|
||
## Usage | ||
|
||
```javascript | ||
import { TurboPufferVectorStore } from "langchain-turbopuffer"; | ||
|
||
const embeddings = new OpenAIEmbeddings(); | ||
|
||
const vectorStore = new TurboPufferVectorStore(embeddings); | ||
|
||
const doc = new Document({ | ||
pageContent: "This is a test", | ||
metadata: { | ||
source: "https://example.com", | ||
}, | ||
}); | ||
|
||
await vectorStore.addDocuments([doc]); | ||
``` | ||
|
||
## Contribute to the project | ||
|
||
This is a community project, so feel free to contribute to it and bring up any issues. If you have any questions, please contact me on the Turbopuffer Slack. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "langchain-turbopuffer", | ||
"version": "0.0.2", | ||
"description": "An open source and LangChain compatible Vector Store class for Turbopuffer. Store vectors in object storage for cheap.", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"build": "tsc", | ||
"publish-package": "pnpm build && npm publish --access public" | ||
}, | ||
"keywords": [ | ||
"AI", | ||
"retriever", | ||
"vector store", | ||
"object store", | ||
"turbopuffer", | ||
"langchain" | ||
], | ||
"author": "Matt Carey", | ||
"license": "MIT", | ||
"dependencies": { | ||
"langchain": "^0.0.204" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.10.5", | ||
"typescript": "^5.3.3" | ||
}, | ||
"files": [ | ||
"dist/*" | ||
] | ||
} |
Oops, something went wrong.