Accessing openai.ChatCompletion, no longer supported in openai>=1.0.0 - how to update the code to use the new API? (AZURE)
- Vorherrschende Sprache
- Python
- Sterne
- 78.7k
- Forks
- 9.6k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I'm using Azure API keys.
The error in backend logs indicates that the [openai.ChatCompletion] API has been removed in [openai>=1.0.0].
You need to update your code to use the new API.
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
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.