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 ):
@@ -737,6 +733,11 @@ def generate_embedding(
737733 Returns:
738734 List of floats representing the embedding vector
739735 """
736+ from idp_common .image import (
737+ prepare_image ,
738+ prepare_bedrock_image_attachment
739+ )
740+
740741 if (not text or not isinstance (text , str )) and (not image_source ):
741742 # Return an empty vector for empty input
742743 return []
You can’t perform that action at this time.
0 commit comments