- Newest
- Most votes
- Most comments
The error you're encountering suggests that while your individual document sizes are within the stated 4.5MB limit, there may be other factors contributing to the issue:
-
Combined size: Although each document is under 4.5MB, the total size of both documents (3.11MB + 3.8MB = 6.91MB) exceeds the limit. The Converse API allows up to five documents, but each must be no more than 4.5MB individually.
-
Encoding overhead: When sending documents through the API, there might be additional encoding (such as base64) applied, which can increase the effective size of the data being transmitted.
-
Token limit: Even if the file size is within limits, the model may have a maximum token count it can process. Your documents, while under the byte size limit, may exceed the token limit for the model you're using.
-
Text content: Remember that in addition to the documents, you're also sending text. The combined size of all content (text + documents) might be pushing you over a limit.
To resolve this issue, you could try:
- Reducing the size of your documents further, aiming for a combined size well under 4.5MB.
- Splitting your content across multiple API calls if possible.
- Checking if your text content can be reduced.
- Verifying that you're not exceeding any token limits for your chosen model.
If the issue persists even after these adjustments, it would be advisable to contact AWS support for more specific guidance on your use case.
Sources
Amazon Bedrock Converse API: Actual maximum file size limit | AWS re:Post
Message - Amazon Bedrock
Using the Converse API - Amazon Bedrock
Relevant content
- asked 5 months ago
- asked 2 years ago