Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 857 Bytes

README.md

File metadata and controls

12 lines (8 loc) · 857 Bytes

AI Response Generator

An app that sends text prompts to the OpenAI API and displays the results in a list. The AI model generates a text completion that attempts to match whatever context or pattern you give it!

Click here to view the app.

How It's Made

Tech used: HTML, CSS, JavaScript, React

Lessons Learned

  • Never expose API keys in client-side code! I set my API key in a .env file and added it to .gitignore to avoid pushing my API key to GitHub. If the key gets compromised, OpenAI triggers a key rotation and a new API key is assigned. To deploy my project with Heroku, I used config vars to set the API key as an environment variable.