Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion redisvl/utils/vectorize/bedrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from pathlib import Path
from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Union

from botocore.exceptions import ValidationError
from pydantic import ConfigDict
from tenacity import retry, stop_after_attempt, wait_random_exponential
from tenacity.retry import retry_if_not_exception_type
Expand Down Expand Up @@ -221,6 +220,8 @@ def _embed(self, content: Any, **kwargs) -> List[float]:
ValueError: If attempting to embed an image with a text model
ValueError: If embedding fails
"""
from botocore.exceptions import ValidationError

body = self._serialize_request_body(content)

try:
Expand Down Expand Up @@ -261,6 +262,8 @@ def _embed_many(
ValueError: If attempting to embed an image with a text model
ValueError: If embedding fails
"""
from botocore.exceptions import ValidationError

if not isinstance(contents, list):
raise TypeError("`contents` must be a list")

Expand Down