iryna-kondr / scikit-llm

Seamlessly integrate LLMs into scikit-learn.
https://beastbyte.ai/
MIT License
2.98k stars 235 forks source link

Safe openai version to work on? #78

Closed Dededon closed 7 months ago

Dededon commented 7 months ago

Hi, I try to use the few-shot classifier in the sample code. However, it seems that the openai package is restructuring their codes: https://community.openai.com/t/attributeerror-module-openai-has-no-attribute-embedding/484499.

Here are the error codes: Could not obtain the completion after 3 retries: `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. ... A detailed migration guide is available here: https://github.com/openai/openai-python/discussions/742 ` None Could not extract the label from the completion: 'NoneType' object is not subscriptable

So, is there an version of the openai package that is safe to run?