Skip to content

Commit

Permalink
fix: fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
joein committed Jan 22, 2025
1 parent 3980758 commit 721fed5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions qdrant_client/embed/embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@
ImageInput,
)

T = TypeVar("T", TextEmbedding, SparseTextEmbedding, LateInteractionTextEmbedding, ImageEmbedding)
if TextEmbedding is not None:
T = TypeVar(
"T", *[TextEmbedding, SparseTextEmbedding, LateInteractionTextEmbedding, ImageEmbedding]
)
else:
T = TypeVar("T")


class ModelInstance(BaseModel, Generic[T]):
class Config:
arbitrary_types_allowed = True

class ModelInstance(BaseModel, Generic[T], arbitrary_types_allowed=True):
model: T
options: dict[str, Any]
deprecated: bool = False
Expand Down

0 comments on commit 721fed5

Please sign in to comment.