Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions src/dynavec/embeddings/bedrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import base64
import json
from pathlib import Path
from typing import BinaryIO
from typing import Any, BinaryIO

from .base import Embedder, Vector

Expand Down Expand Up @@ -39,7 +39,7 @@ def __init__(
model_id: str = "amazon.titan-embed-text-v2:0",
region: str | None = None,
dimension: int | None = None,
boto_session=None,
boto_session: Any | None = None,
) -> None:
import boto3 # local import keeps base import cheap

Expand Down Expand Up @@ -99,7 +99,7 @@ def __init__(
self,
dimension: int = 1024,
region: str | None = None,
boto_session=None,
boto_session: Any | None = None,
) -> None:
import boto3

Expand Down Expand Up @@ -140,7 +140,7 @@ def _invoke(
if text is None and image_base64 is None:
raise ValueError("At least one of 'text' or 'image' must be provided.")

body: dict = {
body: dict[str , Any] = {
"embeddingConfig": {
"outputEmbeddingLength": self.dimension,
}
Expand Down
2 changes: 2 additions & 0 deletions src/dynavec/eval/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,5 @@ def plot_retrieval_metrics(
plt.close(fig)

return output_path

Comment thread
ramashishmaurya marked this conversation as resolved.

Loading