Skip to content

Commit

Permalink
Migration per openai migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonWeill committed Dec 27, 2023
1 parent deaedda commit f564b1c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/jupyter-ai-magics/jupyter_ai_magics/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ def is_api_key_exc(cls, e: Exception):
"""
import openai

if isinstance(e, openai.error.AuthenticationError):
if isinstance(e, openai.AuthenticationError):
error_details = e.json_body.get("error", {})
return error_details.get("code") == "invalid_api_key"
return False
Expand Down Expand Up @@ -574,7 +574,7 @@ def is_api_key_exc(cls, e: Exception):
"""
import openai

if isinstance(e, openai.error.AuthenticationError):
if isinstance(e, openai.AuthenticationError):
error_details = e.json_body.get("error", {})
return error_details.get("code") == "invalid_api_key"
return False
Expand Down Expand Up @@ -620,7 +620,7 @@ def is_api_key_exc(cls, e: Exception):
"""
import openai

if isinstance(e, openai.error.AuthenticationError):
if isinstance(e, openai.AuthenticationError):
error_details = e.json_body.get("error", {})
return error_details.get("code") == "invalid_api_key"
return False
Expand Down

0 comments on commit f564b1c

Please sign in to comment.