When I try to ask Cursor to generate or edit Python scripts that use the OpenAI API, it is using old formats that no longer work, and language models that are deprecated. Is there any way to make it aware of updated API changes?
When I paste the current OpenAI chat completion script from the api reference page, and ask Cursor if this is correct, I get the following response:
No, the code you provided is not correct. The OpenAI Python client library does not have a class named OpenAI. Instead, you should use the openai.ChatCompletion.create method to generate chat completions.
And then if continues to give me corrected code that will not work.
Likewise it is not aware of the model deprecations that just occured at the start of January, and gives me new code with language models that no longer function.