Skip to content

Learning LangchainJS basics, implementing LangchainJS into basic projects and running them on CLI.

Notifications You must be signed in to change notification settings

TonyH0401/langchainjs-learning-01-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LangChainJS Learning 01 CLI

Welcome to my LangChainJS repository implementation! This project is designed to provide a comprehensive guide to understanding and using LangChainJS, a powerful LLM Framework in a JavaScript library.

Table of Contents

Introduction

This is my implementation of LangChainJS - An LLM Framework in a JavaScript library. Each lesson has notes, synopsis and questions for future lessons to answer and expand on. There are also several extra/side projects I was researching included in the folder.

The original tutorial playlist that I based on is linked here. I will also have the playlist displayed in case the hyperlink is not accessible https://youtube.com/playlist?list=PL4HikwTaYE0EG379sViZZ6QsFMjJ5Lfwj&si=o1vtvZ9lAB8sETbH.

Getting Started

I recommend running this project on NodeJS v20+. This project was originally running on NodeJS v21.7.1.

Installation

To get started, you need to download this project from Github and navigate to the project's folder.

cd langchainjs-learning-01-cli/

Dowloading the project's dependencies.

npm install
npm install nodemon --save-dev

Environment Variable

This step is important! Create an .env file to store your API KEY(s). These are the API KEY(s) you will need. Currently, in this project, I am using Google's Gemini API but you can change it to any LLM(s) you prefer.

GOOGLE_API_KEY=""
OPENAI_API_KEY=""
TAVILY_API_KEY=""
LANGFUSE_PUB=""
LANGFUSE_SEC=""

Quick Start

Run the project using the following command(s).

node .\src\<file name>.js

Development Documentation

Order by newest to oldest.

31/07/2024

  • There was a test file on the OpenAI LLM, the folder was called legacyOpenAI.js, I deleted it because there was no use, nothing was working because nothing is free for OpenAI anymore.

12/06/2024

  • Should change in package.json to "type":"module" first before downloading any npm packges. If you don't do this, you need to delete node_modules/, package-lock.json and wiping it clean. I remember reading this somewhere, forgot to noted it down.

About

Learning LangchainJS basics, implementing LangchainJS into basic projects and running them on CLI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published