We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce1ee1a commit 1e18819Copy full SHA for 1e18819
aishell/query_clients/official_chatgpt_client.py
@@ -3,6 +3,7 @@
3
4
from revChatGPT.V3 import Chatbot
5
6
+from aishell.exceptions import UnauthorizedAccessError
7
from aishell.utils import make_executable_command
8
9
from .query_client import QueryClient
@@ -18,7 +19,7 @@ def __init__(
18
19
super().__init__()
20
OPENAI_API_KEY: Final[Optional[str]] = os.environ.get('OPENAI_API_KEY', openai_api_key)
21
if OPENAI_API_KEY is None:
- raise Exception('OPENAI_API_KEY should not be none')
22
+ raise UnauthorizedAccessError('OPENAI_API_KEY should not be none')
23
24
self.openai_api_key = OPENAI_API_KEY
25
0 commit comments