/ollama-nextjs-chatbot

Next.js, Vercel AI SDK & Ollama chatbot starter example

Primary LanguageTypeScriptMIT LicenseMIT

Next.js, Vercel AI SDK & Ollama chatbot

This starter example shows how to use Next.js, the Vercel AI SDK, Ollama and the Ollama AI Provider to create a ChatGPT-like AI-powered streaming chat bot.

Setup

  1. Install Ollama on your machine.
  2. Pull the model: ollama pull llama3 (reference)
  3. Clone the repository: git clone https://github.com/lgrammel/ollama-nextjs-chatbot.git
  4. Install dependencies: npm install
  5. Start the development server: npm run dev
  6. Go to http://localhost:3000/
  7. Code: app/api/chat/route.ts and app/page.tsx