Skip to content

Commit c428df1

Browse files
committed
docs: add comments and links
1 parent 1d9217b commit c428df1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

adalflow/adalflow/components/model_client/bedrock_client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class BedrockAPIClient(ModelClient):
5050
Setup:
5151
1. Install boto3: `pip install boto3`
5252
2. Ensure you have the AWS credentials set up. There are four variables you can optionally set:
53+
Either AWS_PROFILE_NAME or (AWS_REGION_NAME and AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) are needed
5354
- AWS_PROFILE_NAME: The name of the AWS profile to use.
5455
- AWS_REGION_NAME: The name of the AWS region to use.
5556
- AWS_ACCESS_KEY_ID: The AWS access key ID.
@@ -76,10 +77,9 @@ class BedrockAPIClient(ModelClient):
7677
self.generator = Generator(
7778
model_client=BedrockAPIClient(),
7879
model_kwargs={
79-
"modelId": "anthropic.claude-3-sonnet-20240229-v1:0",
80-
"inferenceConfig": {
81-
"temperature": 0.8
82-
}
80+
"model": "mistral.mistral-7b-instruct-v0:2",
81+
"temperature": 0.8,
82+
"max_tokens": 100
8383
}, template=template
8484
)
8585
@@ -183,6 +183,7 @@ def track_completion_usage(self, completion: Dict) -> CompletionUsage:
183183

184184
def list_models(self, **kwargs):
185185
# Initialize Bedrock client (not runtime)
186+
# Reference: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_ListFoundationModels.html
186187

187188
try:
188189
response = self._client.list_foundation_models(**kwargs)

0 commit comments

Comments
 (0)