Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
billytrend-cohere committed Oct 18, 2024
1 parent ad0cd3d commit ab6ae1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cohere/aws_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
5 changes: 3 additions & 2 deletions src/cohere/manually_maintained/cohere_aws/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down

0 comments on commit ab6ae1b

Please sign in to comment.