Teach you anything in seconds use AI.
2023-02-04.22.43.56.mov
|
|
|
|
|
|
|
❤️ Your logo |
English, Simplified Chinese, Traditional Chinese, Japanese, Italian, German, Spanish,French,Dutch ,Korean,Khmer, Hindi
PR welcome
Inspired by TwtterBio and Danny Richman
Powered by OpenAI, Next.js, Cloudflare Workers and Tailwind CSS.
This project uses the OpenAI Chat Completions API with streaming. It constructs a prompt based on the form and user input, sends it to /api/generate, then streams the response back to the application.
The app is deployed on Cloudflare using OpenNext for Cloudflare.
Create a .env file based on .env.example:
OPENAI_API_KEY=your_key
OPENAI_BASE_URL=your_openai_base_url
OPENAI_MODEL=your_openai_modelThen, run the application in the command line and it will be available at http://localhost:3000.
npm run devInstall dependencies:
npm installLogin to Cloudflare:
npx wrangler loginSet Cloudflare runtime variables in dashboard:
OPENAI_API_KEY(Secret)OPENAI_MODEL(Variable or Secret, optional override)OPENAI_BASE_URL(Variable or Secret, optional override)
Or via CLI:
npx wrangler secret put OPENAI_API_KEY
npx wrangler secret put OPENAI_MODEL
npx wrangler secret put OPENAI_BASE_URLBuild and preview on the Cloudflare runtime:
npm run build:cf
npm run preview:cfDeploy:
npm run deploy:cf