ElmageAce / langchain-js-tutorial

LangChain beginner's tutorial for javascript/typescript

Home Page:https://www.youtube.com/watch?v=bH722QgRlhQ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Langchain Tutorial For Typescript and Javascript Developers

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

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

Credit

This repository heavily borrows from:

About

LangChain beginner's tutorial for javascript/typescript

https://www.youtube.com/watch?v=bH722QgRlhQ


Languages

Language:TypeScript 99.1%Language:Shell 0.9%