Repolode
vercel-labs

vercel-labs/gemini-chatbot

A Next.js and Vercel AI SDK chatbot template that uses Google Gemini by default and can be switched to other LLM providers.

Open-source alternative to:ChatGPT

Stars
1,358
Forks
495
Open issues
36
Last commit
15 days ago

What is it?

This is an open-source chatbot template built with Next.js App Router and the Vercel AI SDK. It ships with Google Gemini (gemini-1.5-pro) as the default model, and the AI SDK lets you switch to providers such as OpenAI, Anthropic, and Cohere with a few lines of code.

The UI is built with shadcn/ui and Tailwind CSS, and the project uses React Server Components and Server Actions. Chat history and user data are stored in Vercel Postgres (powered by Neon), files go to Vercel Blob, and authentication is handled by NextAuth.js.

The project can be deployed to Vercel with one click. For local development, it reads environment variables defined in .env.example, and you can pull them with the Vercel CLI, then run it with pnpm dev.

Key features

  • 01Next.js App Router with React Server Components and Server Actions
  • 02Unified AI SDK API for text, structured objects, and tool calls
  • 03Defaults to Google Gemini, with support for OpenAI, Anthropic, and Cohere
  • 04UI built with shadcn/ui, Tailwind CSS, and Radix UI primitives
  • 05Chat history stored in Vercel Postgres and files in Vercel Blob
  • 06Authentication via NextAuth.js

Use cases

  • Starting a custom chatbot UI on top of Google Gemini
  • Learning how to build streaming chat interfaces with the Vercel AI SDK
  • Prototyping a multi-provider LLM chat app that can swap models
  • Deploying a chatbot template to Vercel with one click

Quick start

  1. 1

    Install Vercel CLI

    npm i -g vercel
  2. 2

    Link local instance with Vercel and GitHub accounts

    vercel link
  3. 3

    Download your environment variables

    vercel env pull
  4. 4

    Install dependencies and start the dev server

    pnpm install && pnpm dev

Things to know

  • Running locally requires a Vercel account and linking the project to Vercel and GitHub.
  • A Google Generative AI API key is needed for the default Gemini model.
  • Persistence and auth features depend on Vercel Postgres, Vercel Blob, and NextAuth setup.

In collections

Topics

FAQ

What is gemini-chatbot?
A Next.js and Vercel AI SDK chatbot template that uses Google Gemini by default and can be switched to other LLM providers. This is an open-source chatbot template built with Next.js App Router and the Vercel AI SDK. It ships with Google Gemini (gemini-1.5-pro) as the default model, and the AI SDK lets you switch to providers such as OpenAI, Anthropic, and Cohere with a few lines of code.
Is gemini-chatbot free to use? What license does it have?
gemini-chatbot is open source under the Other license. Check the license terms before using it in commercial products.
Is gemini-chatbot still maintained?
Actively maintained. The last commit to gemini-chatbot was on Oct 23, 2026.
What can I use gemini-chatbot for?
Starting a custom chatbot UI on top of Google Gemini Learning how to build streaming chat interfaces with the Vercel AI SDK Prototyping a multi-provider LLM chat app that can swap models Deploying a chatbot template to Vercel with one click
How do I install gemini-chatbot?
Install Vercel CLI: npm i -g vercel Link local instance with Vercel and GitHub accounts: vercel link Download your environment variables: vercel env pull Install dependencies and start the dev server: pnpm install && pnpm dev
Where can I get gemini-chatbot?
The source code and installation instructions are on GitHub: https://github.com/vercel-labs/gemini-chatbot

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects