No description
Find a file
Jared Palmer 972bfa64ec Fix login
2023-06-16 16:51:39 -04:00
app ai-connector -> ai 2023-06-16 22:43:24 +02:00
assets/fonts feat: implement og image 2023-06-16 18:41:22 +04:00
components Fix login 2023-06-16 16:51:39 -04:00
lib ai-connector -> ai 2023-06-16 22:43:24 +02:00
public chore: add favicons 2023-06-15 16:02:02 +04: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
auth.ts Fix up auth 2023-06-16 13:30:27 -04:00
middleware.ts Fix up auth 2023-06-16 13:30:27 -04:00
next-auth.d.ts Fix types 2023-06-16 14:18:49 -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 ai-connector -> ai 2023-06-16 22:43:24 +02:00
pnpm-lock.yaml ai-connector -> ai 2023-06-16 22:43:24 +02: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 Update README.md 2023-06-16 14:09:35 -04:00
tailwind.config.js feat: implement sharing page 2023-06-16 17:06:23 +04:00
tsconfig.json Update next-auth 2023-06-16 12:03:09 -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