Skip to content

Commit

Permalink
rename typevar
Browse files Browse the repository at this point in the history
  • Loading branch information
micpst committed Dec 19, 2024
1 parent ea9c187 commit b60a1e3
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/ragbits-core/src/ragbits/core/vector_stores/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@ class VectorStoreOptions(Options):
max_distance: float | None = None


VectorStoreOptionsType = TypeVar("VectorStoreOptionsType", bound=VectorStoreOptions)
VectorStoreOptionsT = TypeVar("VectorStoreOptionsT", bound=VectorStoreOptions)


class VectorStore(ConfigurableComponent[VectorStoreOptionsType], ABC):
class VectorStore(ConfigurableComponent[VectorStoreOptionsT], ABC):
"""
A class with an implementation of Vector Store, allowing to store and retrieve vectors by similarity function.
"""

options_cls: type[VectorStoreOptionsType]
options_cls: type[VectorStoreOptionsT]
default_module: ClassVar = vector_stores
configuration_key: ClassVar = "vector_store"

def __init__(
self,
default_options: VectorStoreOptionsType | None = None,
default_options: VectorStoreOptionsT | None = None,
metadata_store: MetadataStore | None = None,
) -> None:
"""
Expand Down Expand Up @@ -96,9 +96,7 @@ async def store(self, entries: list[VectorStoreEntry]) -> None:
"""

@abstractmethod
async def retrieve(
self, vector: list[float], options: VectorStoreOptionsType | None = None
) -> list[VectorStoreEntry]:
async def retrieve(self, vector: list[float], options: VectorStoreOptionsT | None = None) -> list[VectorStoreEntry]:
"""
Retrieve entries from the vector store.
Expand Down

0 comments on commit b60a1e3

Please sign in to comment.