Usually my python code with openai apis work jut fine, but this morning onwards, Ive started getting 404 errors.
So, I went back to the most basic code from the api docs - yet I get the 404 error, for code that worked fine till yesterday
Thanks for the help. - pls see below.
“Error code: 404 - {‘error’: {‘type’: ‘invalid_request_error’, ‘code’: ‘unknown_url’, ‘message’: 'Unknown request URL:”
the code itself is very straightforward - copy-paste from the docs…
from openai import OpenAI
client = OpenAI()
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?"}
]