Skip to content

tanmayvaij/simple-cli-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-cli-bot

A minimal CLI chatbot built with LangChain and Google Generative AI (Gemini).
It supports memory so the bot remembers previous messages in the same session.


✨ Features

  • Chat with Gemini 2.0 Flash from your terminal.
  • Uses LangChain ConversationChain for natural flow.
  • BufferMemory keeps track of the conversation context.
  • Simple CLI interface with Node.js.

📦 Installation

  1. Clone this repo:

    git clone https://github.com/tanmayvaij/simple-cli-bot.git
    cd simple-cli-bot
  2. Install dependencies:

    npm install
  3. Create a .env file in the root directory and add your Gemini API key:

    GEMINI_API_KEY=your_api_key_here

Usage

Run the bot:

npm start

Then start chatting:

user: Hello!
ai: Hi there! How can I help you today?

user: Remember my name is Tanmay
ai: Got it! I'll remember your name is Tanmay.

user: What's my name?
ai: Your name is Tanmay.

Exit anytime:

user: exit

🛠 Tech Stack

  • Node.js (TypeScript/JavaScript)
  • LangChain JS
  • Google Generative AI (Gemini 2.0 Flash)

About

A minimal CLI chatbot built with LangChain and Google Generative AI (Gemini). It supports memory so the bot remembers previous messages in the same session.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors