You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Confirm this is an issue with the Python library and not an underlying OpenAI API
This is an issue with the Python library
Describe the bug
I am encountering a recurring error when trying to access openai.Completion. The error message suggests that this is no longer supported in versions of the OpenAI Python library greater than 1.0.0. Despite following the official migration guide and pinning to earlier versions (e.g., openai==0.28), the issue remains unresolved. I have tried various solutions such as:
Downgrading Python from 3.12 to 3.10, and even 3.9
Adjusting API key access methods (environment variables, hardcoding, etc.)
Attempting multiple different virtual environments
Following the migration instructions from the OpenAI repository and discussions, such as using openai migrate.
No matter what I try, I keep encountering the following error:
vbnet
Copy code
You tried to access openai.Completion, 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
Despite using the suggested approach to pin the version (pip install openai==0.28), the issue remains unresolved. Additionally, following the migration guide (#742) didn't yield any success.
To Reproduce
Steps to reproduce the behavior:
Set up a Python virtual environment with Python 3.10.
Install openai using pip install openai==0.27.0 or any version before 1.0.0.
Attempt to use openai.Completion.create() in any script.
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
I am encountering a recurring error when trying to access openai.Completion. The error message suggests that this is no longer supported in versions of the OpenAI Python library greater than 1.0.0. Despite following the official migration guide and pinning to earlier versions (e.g., openai==0.28), the issue remains unresolved. I have tried various solutions such as:
Downgrading Python from 3.12 to 3.10, and even 3.9
Adjusting API key access methods (environment variables, hardcoding, etc.)
Attempting multiple different virtual environments
Following the migration instructions from the OpenAI repository and discussions, such as using openai migrate.
No matter what I try, I keep encountering the following error:
vbnet
Copy code
You tried to access openai.Completion, 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
Despite using the suggested approach to pin the version (pip install openai==0.28), the issue remains unresolved. Additionally, following the migration guide (#742) didn't yield any success.
To Reproduce
Steps to reproduce the behavior:
Code snippets
OS
macOS Monterey
Python version
Python 3.10.15 (also tried Python 3.12.5)
Library version
openai v1.0.1 (Issue also persists with version 0.27.0 and 0.28.0)
The text was updated successfully, but these errors were encountered: