
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
APIRemovedInV1 Traceback (most recent call last)
<ipython-input-13-9ecb8a0ab99b> in <cell line: 17>()
15
16 return res
---> 17 print(chat_with_gpt("인공지능 공부는 어떻게 하면 좋을까?"))
1 frames
/usr/local/lib/python3.10/dist-packages/openai/lib/_old_api.py in __call__(self, *_args, **_kwargs)
37
38 def __call__(self, *_args: Any, **_kwargs: Any) -> Any:
---> 39 raise APIRemovedInV1(symbol=self._symbol)
40
41
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
