Here’s the Python code I used in the class. I’m storing my key in the environment variable ‘OPENAI_API_KEY’

from openai import OpenAI
import os
openai.api_key = os.getenv("OPENAI_API_KEY")
print ("\n")

client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
mess = "beyond 120, any increment in IQ does not necessarily imply higher creativity"
prompt = "restate the following statement: " + mess
print ("Original Message : "+mess)
for x in range (0, 5):
 chat_completion =[{"role": "user", "content": prompt}, ],model="gpt-3.5-turbo")
 print("Revised Message : " +chat_completion.choices[0].message.content)