You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -57,7 +61,7 @@ The model access request is typically processed immediately. Once approved, the
57
61
58
62
For more details, see the [Amazon Bedrock documentation on modifying model access](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access-modify.html).
59
63
60
-
#### Setting Up AWS Credentials & Region
64
+
#### Setting Up AWS Credentials
61
65
62
66
Strands uses [boto3](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html) (the AWS SDK for Python) to make calls to Amazon Bedrock. Boto3 has its own credential resolution system that determines which credentials to use when making requests to AWS.
63
67
@@ -156,6 +160,7 @@ The [`BedrockModel`](../../../api-reference/models.md#strands.models.bedrock) su
156
160
|[`boto_session`](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html)| Boto Session to use when creating the Boto3 Bedrock Client | Boto Session with region: "us-west-2" |
157
161
|[`boto_client_config`](https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html)| Botocore Configuration used when creating the Boto3 Bedrock Client | - |
158
162
|[`region_name`](https://docs.aws.amazon.com/general/latest/gr/bedrock.html)| AWS region to use for the Bedrock service | "us-west-2" |
163
+
|[`streaming`](https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods.html)| Flag to enable/disable streaming mode | True |
159
164
|[`temperature`](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InferenceConfiguration.html#API_runtime_InferenceConfiguration_Contents)| Controls randomness (higher = more random) |[Model-specific default](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html)|
160
165
|[`max_tokens`](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InferenceConfiguration.html#API_runtime_InferenceConfiguration_Contents)| Maximum number of tokens to generate |[Model-specific default](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html)|
161
166
|[`top_p`](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InferenceConfiguration.html#API_runtime_InferenceConfiguration_Contents)| Controls diversity via nucleus sampling |[Model-specific default](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html)|
@@ -207,6 +212,27 @@ response = agent("Write a short story about an AI assistant.")
207
212
208
213
## Advanced Features
209
214
215
+
### Streaming vs Non-Streaming Mode
216
+
217
+
Certain Amazon Bedrock models only support non-streaming tool use, so you can set the `streaming` configuration to false
218
+
in order to use these models. Both modes provide the same event structure and functionality in your agent, as the non-streaming responses are converted to the streaming format internally.
See the Amazon Bedrock documentation for [Supported models and model features](https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference-supported-models-features.html) to learn about the streaming support for different models.
235
+
210
236
### Multimodal Support
211
237
212
238
Some Bedrock models support multimodal inputs (Documents, Images, etc.). Here's how to use them:
0 commit comments