marsianjohncarter / Using-OpenAi-Api

Using OpenAi Api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using-OpenAi-Api

If you have ever used ChatGPT, you know how useful the thing is. OpenAi (ChatGPT's owners) provide an API for ChatGPT, meaning you can use it through your conosle or terminal. I am going to guide you through the initial steps. First, you need to do is create a new (it's free) account on OpenAi (if you don't have one already), and create a new API key at this url. Make sure you are logged in!


Screenshot 2023-08-17 172011

Log in screen.


Screenshot 2023-08-17 172520

Create new api key.


image

You can call your api key anything you want.


Now you can use ChatGPT in your terminal! Just copy or download the project file and replace:

openai.api_key = 'sk-************************************************'

with your own key. Happy headache!

About

Using OpenAi Api


Languages

Language:Python 100.0%