Skip to content

Just playing around with OpenAI. Uses Openai API to answer questions that you ask it and Vercel edge functions to stream the response back to the client.

License

Notifications You must be signed in to change notification settings

brandtam/sk-chatr-bot

Repository files navigation

ChatrBot.ai

A basic chatbot that can be used to answer questions in different moods for fun.

What it does

In practice, the chatbot can be used to answer questions in different moods. The idea is to show that the responses can be different depending on the mood of the chatbot.


Install the project

  • Clone the project onto your local machine
git clone https://github.com/brandtam/sk-chatr-bot.git
  • Install the packages with your favorite package manager (pnpm)
pnpm install

Setup the OpenAI API

  • Create an account on OpenAI
  • Create an API key
  • Create a .env file in the root of the project
  • Add your API key to the .env file as follows:
OPENAI_KEY=your_api_key_that_you_copied_from_openai

Developing

Once 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 dev

Building

To create a production version of your app:

pnpm run build

Deploying to Production

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

License

MIT

About

Just playing around with OpenAI. Uses Openai API to answer questions that you ask it and Vercel edge functions to stream the response back to the client.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published