A slack style chatbot that uses OpenAI's GPT-4 API to generate responses.
The app defines different "bots" to chat with. Each bot has it's own personality and style of responses. The app uses OpenAI's GPT-4 API to generate responses for the bot.
- Clone the project onto your local machine
git clone https://github.com/brandtam/sk-chatr.git- Install the packages with your favorite package manager (pnpm)
pnpm install- Create an account on OpenAI
- Create an API key
- Create a
.envfile in the root of the project - Add your API key to the
.envfile as follows:
OPENAI_API_KEY=your_api_key_that_you_copied_from_openaiOnce you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:
- Start the server locally
pnpm devTo create a production version of your app:
pnpm run buildSince this specific app uses Vercel Edge Functions you will need to deploy to Vercel.
- Copy the OpenAi API key to the projects environment variables on Vercel.