BhavinPatel04/chatbot

AI chatbot

★ 0Forks 0TypeScriptGitHub ↗Compare

README

Chatbot with Ollama, LangChain, React & TypeScript

A full-stack chatbot application built with:

  • Backend: Node.js, Express, TypeScript, LangChain, Ollama
  • Frontend: React, TypeScript, Modern CSS

Project Structure

chatbot/
├── backend/          # Node.js + Express API server
│   ├── src/
│   ├── package.json
│   └── tsconfig.json
├── frontend/         # React + TypeScript app
│   ├── src/
│   ├── public/
│   ├── package.json
│   └── tsconfig.json
└── README.md

Prerequisites

  • Node.js (v18 or higher)
  • Ollama installed and running locally
  • An Ollama model downloaded (e.g., ollama pull llama2)

Getting Started

  1. Install Ollama (if not already installed):

    # Visit https://ollama.ai/ or install via brew on macOS
    brew install ollama
  2. Start Ollama and pull a model:

    ollama serve
    ollama pull llama2  # or any other model you prefer
  3. Install and run the backend:

    cd backend
    yarn install
    yarn dev
  4. Install and run the frontend:

    cd frontend
    yarn install
    yarn start

The application will be available at http://localhost:3000 with the API running on http://localhost:3001.

Features

  • Real-time chat interface
  • Integration with Ollama models via LangChain
  • TypeScript for type safety
  • Responsive design
  • Message history

Contributors

BhavinPatel04

Issues