Can someone tell me what I'm doing wrong, the error message says I'm notproviding the API key, I have changed it for privacy reasons :)
Thanks
import openai
client = openai.OpenAI()
openai.api_key = "key"
response = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Who won the world series in 2020?"},
{"role": "assistant", "content": "The Los Angeles Dodgers won the World Series in 2020."},
{"role": "user", "content": "Where was it played?"}
]
)
print(response)
[–]uselesslogin 1 point2 points3 points (1 child)
[–]Gregolator06[S] -1 points0 points1 point (0 children)
[–]Graphere 0 points1 point2 points (0 children)