forked from cohere-ai/cohere-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbedrock_client.py
29 lines (25 loc) · 896 Bytes
/
bedrock_client.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import typing
import boto3 # type: ignore
from botocore.auth import SigV4Auth # type: ignore
from botocore.awsrequest import AWSRequest # type: ignore
from tokenizers import Tokenizer # type: ignore
from .aws_client import AwsClient
class BedrockClient(AwsClient):
def __init__(
self,
*,
aws_access_key: typing.Optional[str] = None,
aws_secret_key: typing.Optional[str] = None,
aws_session_token: typing.Optional[str] = None,
aws_region: typing.Optional[str] = None,
timeout: typing.Optional[float] = None,
):
AwsClient.__init__(
self,
service="bedrock",
aws_access_key=aws_access_key,
aws_secret_key=aws_secret_key,
aws_session_token=aws_session_token,
aws_region=aws_region,
timeout=timeout,
)