We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c477c44 commit 1f8eb82Copy full SHA for 1f8eb82
lib/idp_common_pkg/idp_common/extraction/service.py
@@ -10,6 +10,7 @@
10
11
from __future__ import annotations
12
13
+import base64
14
import json
15
import logging
16
import os
@@ -461,6 +462,13 @@ def _convert_image_uris_to_bytes_in_content(
461
462
f"Invalid file path {image_uri} - expecting S3 path"
463
)
464
465
+ converted_item = image.prepare_bedrock_image_attachment(image_bytes)
466
+ elif "image_base64" in item:
467
+ image_base64 = item["image_base64"]
468
+
469
+ # Decode image content
470
+ image_bytes = base64.b64decode(image_base64)
471
472
converted_item = image.prepare_bedrock_image_attachment(image_bytes)
473
elif "image" in item:
474
# Keep existing image objects as-is
0 commit comments