openai.ChatCompletion error OpenAI library version 1.60.1

if you are using GPT a to generate code it will give you wrong code and get the error above .
Tell it to use client.chat.completions.create, not openai.ChatCompletion.
it was updated for OpenAI library version 1.60.1
I spent 2 hours in this loop.
You don’t have to.
Can you believe I’m paying $200 for this?
If anyone is interested in GPT loops i have loads.
Could make a funny twitter account like GPTFAILS .