Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mayooear/langchain-js-tutorial
LangChain beginner's tutorial for javascript/typescript
https://github.com/mayooear/langchain-js-tutorial
gpt3 javascript langchain llm openai typescript
Last synced: 12 days ago
JSON representation
LangChain beginner's tutorial for javascript/typescript
- Host: GitHub
- URL: https://github.com/mayooear/langchain-js-tutorial
- Owner: mayooear
- Created: 2023-03-01T01:40:08.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-01T01:46:32.000Z (almost 2 years ago)
- Last Synced: 2025-01-26T04:06:08.160Z (26 days ago)
- Topics: gpt3, javascript, langchain, llm, openai, typescript
- Language: TypeScript
- Homepage: https://www.youtube.com/watch?v=bH722QgRlhQ
- Size: 4.88 MB
- Stars: 181
- Watchers: 3
- Forks: 67
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Langchain Tutorial For Typescript and Javascript Developers
- [LangChain typescript tutorial video](https://www.youtube.com/watch?v=bH722QgRlhQ)
- The visual explanation diagram is in the `visual-image` folder.## What is Langchain?
In simple terms, langchain is a framework and library of useful templates and tools that make it easier to build large language model applications that use custom data and external tools.
Essentially, langchain makes it easier to build chatbots for your own data and "personal assistant" bots that respond to natural language.
## Quick install
After you clone the repo, follow these instructions:
1. Install packages
`npm install`2. Add OpenAI, Pinecone and SerpApi keys as environment variables
- create a `.env` file in the root of the folder
- copy the environmental variables from `.env.example` into `.env` and replace with the keys from respective websites
- [openAI](https://platform.openai.com/account/api-keys).
- [serpAPI](https://serpapi.co)
- [Pinecone](https://www.pinecone.io/)## Usage
To run a specific example in the repo, simply run the bash script below and replace "examplePath" with the relative path from src/index.ts to the example file:
`npm run start {examplePath}`
For example:
`npm run start ./prompts/basic.ts`
## Resources
- [LangChainDocs](https://hwchase17.github.io/langchainjs/docs/overview)
- [PineconeDocs](https://docs.pinecone.io/docs/node-client)## Credit
This repository heavily borrows from:
- [LangchainJS](https://github.com/hwchase17/langchainjs) - official langchain library