Skip to content

sathishkumar-smart/ollama-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Ollama Chatbot

A full-stack AI chatbot with conversation memory, built with FastAPI + Next.js + Ollama (local LLM).

Tech Stack

  • Backend: Python, FastAPI
  • Frontend: Next.js (React, TypeScript, Tailwind CSS)
  • AI: Ollama — runs fully locally, no API key needed

    Swap any model by changing OLLAMA_MODEL in backend/.env

Features

  • 💬 Real-time chat interface
  • 🧠 Full conversation history — model remembers context
  • 🔒 Runs 100% locally — no data sent to external APIs
  • ⚡ FastAPI async backend with CORS support
  • 🎨 Clean dark UI with loading animations

Project Structure

ollama-chatbot/
├── backend/
│   ├── main.py          # FastAPI app
│   ├── .env             # Config (model name, Ollama URL)
│   └── requirements.txt
└── frontend/
    └── app/
        └── page.tsx     # Chat UI

How to Run

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • Ollama installed and running locally

1. Start Ollama model

ollama run tinyllama

2. Backend

cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload --port 8000

3. Frontend

cd frontend
npm install
npm run dev

Open http://localhost:3000

API Endpoints

Method Endpoint Description
GET / Health check
POST /chat Send message with full history
DELETE /chat Clear conversation

About

Full-stack AI chatbot with conversation memory — FastAPI + Next.js + Ollama

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors