No description
Find a file
2023-06-14 16:04:03 +04:00
app feat: implement styles for sign in and sign up forms 2023-06-14 16:04:03 +04:00
components Move to clerk 2023-06-13 17:31:15 -04:00
lib feat: implement copy message 2023-06-13 23:58:59 +04:00
public add favicon 2023-05-23 17:17:27 +02:00
.env.example Add a readme 2023-06-11 10:25:51 -04:00
.eslintrc.json chore: add eslint plugins for import and className sorting 2023-06-11 15:39:04 +04:00
.gitignore Don't commit vscode 2023-06-11 10:26:39 -04:00
middleware.ts Move to clerk 2023-06-13 17:31:15 -04:00
next-env.d.ts init 2023-05-19 12:33:56 -04:00
next.config.js More cleanup 2023-06-02 15:21:49 -04:00
package.json Move to clerk 2023-06-13 17:31:15 -04:00
pnpm-lock.yaml Move to clerk 2023-06-13 17:31:15 -04:00
postcss.config.js init 2023-05-19 12:33:56 -04:00
prettier.config.cjs Remove "@ianvs/prettier-plugin-sort-imports": "^3.7.2" 2023-06-11 11:15:39 -04:00
README.md docs: shadcn is lowercase 2023-06-13 16:05:27 +04:00
tailwind.config.js fix: update sidebar transition 2023-06-11 22:57:31 +04:00
tsconfig.json init 2023-05-19 12:33:56 -04:00

Next.js AI Chatbot

A Next.js 13 and App Router-ready AI chatbot template featuring:

  • Next.js App Router
  • React Server Components (RSCs), Suspense, and Server Actions
  • Vercel AI SDK for streaming chat UI
  • Support for OpenAI (default), Anthropic, HuggingFace, or custom AI chat models and/or LangChain
  • Edge runtime-ready
  • shadcn/ui
  • Chat History, rate limiting, and session storage with Vercel KV
  • Next Auth for authentication

Model Providers

This template ships with OpenAI gpt-3.5-turbo as the default. However, thanks to the Vercel AI SDK, switching LLM providers to Anthropic, HuggingFace, or using LangChain with just a few lines of code.

Running locally

You will need to use the environment variables defined in .env.example to run Next.js AI Chatbot. It's recommended you use Vercel Environment Variables for this, but a .env file is all that is necessary.

Note: You should not commit your .env file or it will expose secrets that will allow others to control access to your various OpenAI and authentication provider accounts.

  1. Install Vercel CLI: npm i -g vercel
  2. Link local instance with Vercel and GitHub accounts (creates .vercel directory): vercel link
  3. Download your environment variables: vercel env pull
pnpm install
pnpm dev

Your app should now be running on localhost:3000.

Authors

This library is created by Vercel and Next.js team members, with contributions from:

Contributors