File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
lib/idp_common_pkg/idp_common/bedrock Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 2626 EndpointConnectionError ,
2727)
2828from urllib3 .exceptions import ReadTimeoutError as Urllib3ReadTimeoutError
29- from idp_common .image import (
30- prepare_image ,
31- prepare_bedrock_image_attachment
32- )
3329
3430# Dummy exception classes for requests timeouts if requests is not available
3531class _RequestsReadTimeout (Exception ):
@@ -724,6 +720,11 @@ def generate_embedding(
724720 Returns:
725721 List of floats representing the embedding vector
726722 """
723+ from idp_common .image import (
724+ prepare_image ,
725+ prepare_bedrock_image_attachment
726+ )
727+
727728 if (not text or not isinstance (text , str )) and (not image_source ):
728729 # Return an empty vector for empty input
729730 return []
You can’t perform that action at this time.
0 commit comments