langchain-ts-starter
Boilerplate to get started quickly with the Langchain Typescript SDK.
This uses the same tsconfig and build setup as the examples repo, to ensure it's in sync with the official docs.
What's included
- Typescript
- .env file configuration
- ESLint and Prettier for formatting
- Turborepo to quickly run build scripts
tsup
to bundle Typescript codetsx
to quickly run compiled code
How to use
- Clone this repository
npm install
- Write your code in
src
npx turbo run build lint format
to run build scripts quickly in parallelnpm start
to run your program
My notes
- For some reason
npm install
for the original repo andnpm install --save chromadb
only work with node 16. But you need to runnpm start
with node 18 otherwise axios dependency fails becauseHeaders
is a new feature. - To use chroma for embedings and vector store you need to install the server. It seems that the python version allows in memory db but with this client sdk you need the server running. Chroma can be installed via docker using this repo. On my machine I had to change the ports config in
docker-compose.yml