MeenakshyBS / legendary-potato

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make your own program using OpenAI

Here's a fun little program that uses the OpenAI API to generate a random fun fact and asks the user to guess whether the fact is true or false.

Prerequisites

  • Python

Getting Started

  • Make sure that you have installed the openai package by running pip install openai in your terminal or command prompt
  • Before you can run the code, you need to replace "YOUR_API_KEY" with your actual API key, which you can find on your OpenAI account dashboard.
  • To get your OpenAI API key, you will need to create an OpenAI account if you haven't already. Here are the steps:
  • Go to https://beta.openai.com/signup/.
  • Once you have created an account, you can find your API key by going to https://beta.openai.com/account/api-keys.
  • Copy the API key provided on that page and replace "YOUR_API_KEY" in the code snippet with your actual API key.

Output

Screenshot 2023-03-25 at 6 00 52 PM

License

MIT License

About


Languages

Language:Python 100.0%