AI Chat bot built on Cloudflare workers, powered by OpenAI
-
install wrangler
npm install -g wrangler wrangler login
-
clone the repo to your local machine and install the dependencies
git clone https://github.com/realByg/cfworkers-aichat cd cfworkers-aichat npm i
-
edit
wrangler.toml
name = "ai" # the prefix of your *.workers.dev domain main = "index.js" compatibility_date = "2023-02-10" workers_dev = true [vars] API_KEY = "" # (optional) set you api key from openai here ORG_ID = "" [site] bucket = "./site/dist"
-
deploy the site with wrangler
wrangler publish