APIRemovedinV1 Error When Trying to Access API

Hi There,

I’m trying to create my first custom gpt. I’m new to code so please excuse me if some of my language is a little off or elementary:

I created a virtual environment in Python and was able to build the tool I wanted and have entered the accurate api key in the code. It’s a simple image converter. The tool works fine, but I cannot seem to get it to integrate with the API. I keep receiving this error message on the following page upon using the tool:

" APIRemovedInV1

openai.lib._old_api.APIRemovedInV1: You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0

After attempting to do some basic troubleshooting, I am still stuck. The model I have in the code is model=“gpt-4-turbo”. Is this not the most up to date one or does it have something to do with why I keep receiving this error? Any help or guidance would be thoroughly appreciated!