Skip to content

Commit 1e18819

Browse files
committed
Change error type
1 parent ce1ee1a commit 1e18819

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

aishell/query_clients/official_chatgpt_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from revChatGPT.V3 import Chatbot
55

6+
from aishell.exceptions import UnauthorizedAccessError
67
from aishell.utils import make_executable_command
78

89
from .query_client import QueryClient
@@ -18,7 +19,7 @@ def __init__(
1819
super().__init__()
1920
OPENAI_API_KEY: Final[Optional[str]] = os.environ.get('OPENAI_API_KEY', openai_api_key)
2021
if OPENAI_API_KEY is None:
21-
raise Exception('OPENAI_API_KEY should not be none')
22+
raise UnauthorizedAccessError('OPENAI_API_KEY should not be none')
2223

2324
self.openai_api_key = OPENAI_API_KEY
2425

0 commit comments

Comments
 (0)