import openai
# Apply the API key
openai.api_key = "YOUR_API_KEY_HERE"
# Define the text prompt
prompt = "In a shocking turn of events, scientists have discovered that "
# Generate completions using the API
completions = openai.Completion.create(
engine="text-davinci-002",
prompt=prompt,
max_tokens=100,
stop=None,
temperature=0.5,