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.
- Install Ollama on your machine.
- Pull the model:
ollama pull llama3
(reference) - Clone the repository:
git clone https://github.com/lgrammel/ollama-nextjs-chatbot.git
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Go to http://localhost:3000/
- Code:
app/api/chat/route.ts
andapp/page.tsx