๐Ÿ“ฆ Krish-bhardwaj / ai-gpt3-chatbot

โ˜… 0 stars โ‘‚ 0 forks ๐Ÿ‘ 0 watching
๐Ÿ“ฅ Clone https://github.com/Krish-bhardwaj/ai-gpt3-chatbot.git
HTTPS git clone https://github.com/Krish-bhardwaj/ai-gpt3-chatbot.git
SSH git clone git@github.com:Krish-bhardwaj/ai-gpt3-chatbot.git
CLI gh repo clone Krish-bhardwaj/ai-gpt3-chatbot
Krish Bhardwaj Krish Bhardwaj Update README.md 6946d86 2 years ago ๐Ÿ“ History
๐Ÿ“‚ 6946d865ba403e62c840ed37adf27f1f0835b771 View all commits โ†’
๐Ÿ“ components
๐Ÿ“ pages
๐Ÿ“ public
๐Ÿ“ utils
๐Ÿ“„ .env.example
๐Ÿ“„ .eslintrc.json
๐Ÿ“„ .gitignore
๐Ÿ“„ next-env.d.ts
๐Ÿ“„ package.json
๐Ÿ“„ pnpm-lock.yaml
๐Ÿ“„ postcss.config.js
๐Ÿ“„ README.md
๐Ÿ“„ tailwind.config.js
๐Ÿ“„ tsconfig.json
๐Ÿ“„ turbo.json
๐Ÿ“„ vercel.json
๐Ÿ“„ README.md

AI Chat GPT-3 ( test )

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

Components

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

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

then, update OPENAI_API_KEY with your OpenAI secret key.

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).