penai.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 https://github.com/openai/openai-python 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: https://github.com/openai/openai-python/discussions/742
这个错误表明您正在尝试使用OpenAI的旧API,但在版本1.0.0及以上中不再支持。解决这个问题的方法取决于您想要如何处理API升级。以下是一些可能的解决方案:
使用python 8和
openai 0.28.0
或者,升级openai 为最新版本,如果你使用非官方api,此时还要关闭vpn