A ChatGPT-based meme generator. Is this a good idea? No! But did I do it anyway? You betcha!
This application is built off the Beginner Chat API Frontend and adds another API call, this time to the Imgflip API.
Why? Because memes!
These instructions assume you already have an OpenAI account and an ImgFlip account. If you don't, go to openai.com and imgflip.com and create one!
- Clone this repo (if you have the GitHub CLI, it's as easy as
gh repo clone bildungsroman/beginner-chat-api
) cd beginner-chat-api && npm install
- Go to your API keys in OpenAI and click
Create new secret key
. Copy your new key. - Create an
.env
file in the root of the directory and set your new key there:echo VITE_OPENAI_API_KEY=<Your API Key here> > .env
- Open the
.env
file and add:
VITE_IMGFLIP_API_USERNAME=<Your username here>
VITE_IMGFLIP_API_PASSWORD=<Your password here>
- Run
npm run dev
and you should be able to open your app locally and start interacting with the prompts. If you encounter any errors, there are someconsole.log()
s you can uncomment insrc/utils/callChatAPI.ts
to help you debug issues.
And that's it! This is just to get you started building an app that utilizes the ChatGPT API - just imagine the possibilities 🪄🧙🦄
Standard please don't sue me if you go broke disclaimer: You may need to upgrade your OpenAI account or add credits to use the API if you have a free account. Please don't go overboard, they really don't need your money at this point.