/openai-tweet-generator

Node.js example app from the OpenAI API quickstart tutorial

Primary LanguageCSS

OpenAI API Tweet Generator

This is a fake tweet generator app based on the Pet name generator app created for the OpenAPI quickstart tutorial. Check out the instructions below to get the project running.

Setup

  1. If you don’t have Node.js installed, install it from here

  2. Clone this repository

  3. Navigate into the project directory

    $ cd openai-tweet-generator
  4. Install the requirements

    $ npm install
  5. Go to the OpenAI API site

  6. Sign up for an account and follow their documentation to generate an API key

  7. Create a .env file in the main directory of this repository and copy your newly generated API access key in the following format

    OPENAI_API_KEY=PASTE_YOUR_API_KEY_HERE
  8. Run the app

    $ npm run dev

You should now be able to access the app at http://localhost:3000! Feel free to modify the app to do whatever you'd like and don't forget to check out the OpenAI tutorial covering usage of the API!

Acknowledgements

This project was created with the Next.js framework with React.

This project uses the fake-tweet react component by lluiscamino.