LangChain.js LLM Template logo

LangChain.js LLM Template

Free

LangChain LLM template that allows you to train your own custom AI LLM model. ![GitHub Repo stars](https://img.shields.io/github/stars/Conner1115/LangChain.js-LLM-Template?style=social)

FreeFree tier
Type
Open Source

About LangChain.js LLM Template

LangChain.js LLM Template is an open-source repository that provides a starting point for training custom AI language models using LangChain.js. Users can supply their own data in markdown files stored in the 'training' directory, add an OpenAI API key, and then run a training script to create a vector store. The template includes a customizable base prompt in 'lib/basePrompt.js'. After setup, running 'index.js' allows interaction with the trained model. Note: This repository was archived on October 10, 2024, and is now read-only, meaning it is no longer actively maintained.

Key Features

Train on any data provided in markdown files
Uses LangChain.js framework
OpenAI API integration for vector store and querying
Customizable base prompt in lib/basePrompt.js
Simple setup: yarn train / npm train then run index.js
Supports nested directory structures for training data

Pros & Cons

Pros
  • Free and open-source
  • Easy to get started with own data in markdown format
  • Leverages LangChain.js for vector store and retrieval
  • Lightweight template requiring minimal setup
Cons
  • Archived and no longer maintained (read-only as of Oct 2024)
  • Requires an OpenAI API key, incurring costs for usage
  • Training is limited to vector store creation, not actual model fine-tuning
  • No releases or packages available
  • Limited community support due to archive status

Best For

Building a custom chatbot trained on company documentationCreating a knowledge base assistant from private notesExperimenting with LangChain.js for custom LLM workflowsRapid prototyping of AI models on specific datasets

FAQ

What do I need to use this template?
You need to provide training data in markdown files inside the 'training' directory, add an OpenAI API key as an environment variable (OPENAI_API_KEY), run 'yarn train' or 'npm train' to build the vector store, and then run 'index.js' to interact with the model.
Is this template still maintained?
No. The repository was archived on October 10, 2024, and is now read-only. It is no longer actively maintained by the owner.
What programming language is the template written in?
The repository is primarily JavaScript (85.7%) with some Nix configuration (14.3%).