Skip to content

rschwabco/ai-chat-bot-vercel

Repository files navigation

AI Chat GPT-3 example

This example shows how to implement a chat bot backed by Pinecone using Next.js, API Routes, and OpenAI ChatGPT API.

Components

  • Next.js
  • OpenAI API (ChatGPT) - streaming
  • API Routes (Edge runtime) - streaming
  • Pinecone store

How to Use

You can choose from one of the following two methods to use this repository:

One-Click Deploy

Deploy the example using Vercel:

Deploy with Vercel

Clone and Deploy

Execute create-next-app with pnpm to bootstrap the example:

pnpm create next-app --example https://github.com/vercel/examples/tree/main/solutions/ai-chatgpt

Set up environment variables

Rename .env.example to .env.local:

cp .env.example .env.local

Update OPENAI_API_KEY with your OpenAI secret key. Update PINECONE_API_KEY with your Pinecone secret key, and PINECONE_ENVIRONMENT with your Pinecone environment name. Choose a PINECONE_INDEX name for your index. If the index does not exist, it will be created automatically.

Next, run Next.js in development mode:

pnpm dev

The app should be up and running at http://localhost:3000.

Deploy it to the cloud with Vercel (Documentation).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published