Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vercel-labs/ai-chatbot
A full-featured, hackable Next.js AI chatbot built by Vercel
https://github.com/vercel-labs/ai-chatbot
ai chatgpt gpt-3 gpt-4 nextjs react redis shadcn-ui vercel
Last synced: 4 months ago
JSON representation
A full-featured, hackable Next.js AI chatbot built by Vercel
- Host: GitHub
- URL: https://github.com/vercel-labs/ai-chatbot
- Owner: vercel
- License: other
- Created: 2023-05-19T16:36:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-12T15:25:20.000Z (8 months ago)
- Last Synced: 2024-04-14T10:20:29.440Z (8 months ago)
- Topics: ai, chatgpt, gpt-3, gpt-4, nextjs, react, redis, shadcn-ui, vercel
- Language: TypeScript
- Homepage: https://chat.vercel.ai
- Size: 1.91 MB
- Stars: 4,782
- Watchers: 64
- Forks: 1,244
- Open Issues: 67
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-langchain-zh - AI Chatbot - labs/ai-chatbot?style=social): 这是一个由Vercel Labs构建的功能齐全、可定制的Next.js AI聊天机器人。 (开源项目 / 其他聊天机器人)
- awesome-chatgpt - ai-chatbot - Personalized ChatGPT AI chatbot. (Web apps / Hosted and self-hosted)
- awesome-ChatGPT-repositories - ai-chatbot - A full-featured, hackable Next.js AI chatbot built by Vercel Labs (Chatbots)
- awesome-chatgpt - ai-chatbot - Personalized ChatGPT AI chatbot. (Web apps / Hosted and self-hosted)
- StarryDivineSky - vercel-labs/ai-chatbot
- AiTreasureBox - vercel-labs/ai-chatbot - 11-02_6644_5](https://img.shields.io/github/stars/vercel-labs/ai-chatbot.svg)|A full-featured, hackable Next.js AI chatbot built by Vercel Labs| (Repos)
- awesome-langchain - AI Chatbot - featured, hackable Next.js AI chatbot built by Vercel Labs ![GitHub Repo stars](https://img.shields.io/github/stars/vercel-labs/ai-chatbot?style=social) (Open Source Projects / Other / Chatbots)
README
An open-source AI chatbot app template built with Next.js, the Vercel AI SDK, OpenAI, and Vercel KV.
Features ·
Model Providers ·
Deploy Your Own ·
Running locally ·
Authors
## Features
- [Next.js](https://nextjs.org) App Router
- React Server Components (RSCs), Suspense, and Server Actions
- [Vercel AI SDK](https://sdk.vercel.ai/docs) for streaming chat UI
- Support for OpenAI (default), Anthropic, Cohere, Hugging Face, or custom AI chat models and/or LangChain
- [shadcn/ui](https://ui.shadcn.com)
- Styling with [Tailwind CSS](https://tailwindcss.com)
- [Radix UI](https://radix-ui.com) for headless component primitives
- Icons from [Phosphor Icons](https://phosphoricons.com)
- Chat History, rate limiting, and session storage with [Vercel KV](https://vercel.com/storage/kv)
- [NextAuth.js](https://github.com/nextauthjs/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](https://sdk.vercel.ai/docs), you can switch LLM providers to [Anthropic](https://anthropic.com), [Cohere](https://cohere.com/), [Hugging Face](https://huggingface.co), or using [LangChain](https://js.langchain.com) with just a few lines of code.
## Deploy Your Own
You can deploy your own version of the Next.js AI Chatbot to Vercel with one click:
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?demo-title=Next.js+Chat&demo-description=A+full-featured%2C+hackable+Next.js+AI+chatbot+built+by+Vercel+Labs&demo-url=https%3A%2F%2Fchat.vercel.ai%2F&demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2F4aVPvWuTmBvzM5cEdRdqeW%2F4234f9baf160f68ffb385a43c3527645%2FCleanShot_2023-06-16_at_17.09.21.png&project-name=Next.js+Chat&repository-name=nextjs-chat&repository-url=https%3A%2F%2Fgithub.com%2Fvercel-labs%2Fai-chatbot&from=templates&skippable-integrations=1&env=OPENAI_API_KEY%2CAUTH_SECRET&envDescription=How+to+get+these+env+vars&envLink=https%3A%2F%2Fgithub.com%2Fvercel-labs%2Fai-chatbot%2Fblob%2Fmain%2F.env.example&teamCreateStatus=hidden&stores=[{"type":"kv"}])
## Creating a KV Database Instance
Follow the steps outlined in the [quick start guide](https://vercel.com/docs/storage/vercel-kv/quickstart#create-a-kv-database) provided by Vercel. This guide will assist you in creating and configuring your KV database instance on Vercel, enabling your application to interact with it.
Remember to update your environment variables (`KV_URL`, `KV_REST_API_URL`, `KV_REST_API_TOKEN`, `KV_REST_API_READ_ONLY_TOKEN`) in the `.env` file with the appropriate credentials provided during the KV database setup.
## Running locally
You will need to use the environment variables [defined in `.env.example`](.env.example) to run Next.js AI Chatbot. It's recommended you use [Vercel Environment Variables](https://vercel.com/docs/projects/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````bash
pnpm install
pnpm dev
```Your app template should now be running on [localhost:3000](http://localhost:3000/).
## Authors
This library is created by [Vercel](https://vercel.com) and [Next.js](https://nextjs.org) team members, with contributions from:
- Jared Palmer ([@jaredpalmer](https://twitter.com/jaredpalmer)) - [Vercel](https://vercel.com)
- Shu Ding ([@shuding\_](https://twitter.com/shuding_)) - [Vercel](https://vercel.com)
- shadcn ([@shadcn](https://twitter.com/shadcn)) - [Vercel](https://vercel.com)