openai.ChatCompletion is no longer supported in openai>=1.0.0

Hi, I got this error during the lab (Exploring Parameters), could you make the necessary code updates to go with the new openai version, please? Thank you

openai.lib._old_api.APIRemovedInV1:

You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0 - see the README at GitHub - openai/openai-python: The official Python library for the OpenAI API for the API.

You can run openai migrate to automatically upgrade your codebase to use the 1.0.0 interface.
Alternatively, you can pin your installation to the old version, e.g. pip install openai==0.28

A detailed migration guide is available here: v1.0.0 Migration Guide · openai/openai-python · Discussion #742 · GitHub

A link to the lab in question would be helpful; this will help me write this up for the contest team.

Hi,
the lab link is above, the correction is pretty simple, we just instantiate the creation with openai.chat.completions instead of openai.ChatCompletion
https://learn.kodekloud.com/user/courses/mastering-generative-ai-with-openai/module/e983525e-3a5a-4043-9319-4f259e41bc79/lesson/b3fccdf8-d6a6-4999-8765-c4ea22fcdd00