From 6007591d4d707839629ef1abff921ca3e882ed73 Mon Sep 17 00:00:00 2001 From: orangetin Date: Sat, 9 Mar 2024 02:57:59 -0800 Subject: [PATCH] fix client error type --- src/together/client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/together/client.py b/src/together/client.py index 5d7e83b5..46e15c30 100644 --- a/src/together/client.py +++ b/src/together/client.py @@ -3,7 +3,7 @@ from together import resources from together.constants import BASE_URL, MAX_CONNECTION_RETRIES, TIMEOUT_SECS -from together.error import TogetherException +from together.error import AuthenticationError from together.types import TogetherClient @@ -40,7 +40,7 @@ def __init__( api_key = os.environ.get("TOGETHER_API_KEY") if api_key is None: - raise TogetherException( + raise AuthenticationError( "The api_key client option must be set either by passing api_key to the client or by setting the " "TOGETHER_API_KEY environment variable" ) @@ -102,7 +102,7 @@ def __init__( api_key = os.environ.get("TOGETHER_API_KEY") if api_key is None: - raise TogetherException( + raise AuthenticationError( "The api_key client option must be set either by passing api_key to the client or by setting the " "TOGETHER_API_KEY environment variable" )