diff --git a/src/cohere/aws_client.py b/src/cohere/aws_client.py index 95099682f..f34d60a54 100644 --- a/src/cohere/aws_client.py +++ b/src/cohere/aws_client.py @@ -19,7 +19,7 @@ from botocore.auth import SigV4Auth # type: ignore from botocore.awsrequest import AWSRequest # type: ignore AWS_DEPS_AVAILABLE = True - except ImportError: +except ImportError: AWS_DEPS_AVAILABLE = False class AwsClient(Client): diff --git a/src/cohere/manually_maintained/cohere_aws/client.py b/src/cohere/manually_maintained/cohere_aws/client.py index 5d2a852c4..60addcc7d 100644 --- a/src/cohere/manually_maintained/cohere_aws/client.py +++ b/src/cohere/manually_maintained/cohere_aws/client.py @@ -25,9 +25,10 @@ from botocore.exceptions import ( ClientError, EndpointConnectionError, ParamValidationError) AWS_DEPS_AVAILABLE = True - except ImportError: +except ImportError: AWS_DEPS_AVAILABLE = False +class Client: def __init__( self, aws_region: typing.Optional[str] = None, @@ -38,7 +39,7 @@ def __init__( """ if not AWS_DEPS_AVAILABLE: raise CohereError("AWS dependencies not available. Please install boto3 and sagemaker.") - self._client = boto3.client( + self._client = boto3.client() if os.environ.get('AWS_DEFAULT_REGION') is None: os.environ['AWS_DEFAULT_REGION'] = aws_region self._sess = sage.Session(sagemaker_client=self._service_client)