1 Answer
- Newest
- Most votes
- Most comments
0
You can set the timeout when you initialise the bedrock client [1]. Below is a sample of the code to set it up:
from boto3 import client
from botocore.config import Config
config = Config(read_timeout=1500)
client = boto3.client(service_name='bedrock-runtime',
region_name='us-east-1',
config=config)
It looks like you are using a helper method, so you may need to make the change to add the read_timeout
to the config
within that.
If you are still getting timeouts you could try invoke_model_with_response_stream
[2] as it will start to bring back the response as it generates rather than waiting for the entire processing.
[1] https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-runtime.html
answered 2 months ago
Relevant content
- asked 6 months ago
- asked 4 months ago
- asked 5 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated a month ago