Skip to content

Commit

Permalink
Merge branch 'main' into willtai/hybrid-retriever
Browse files Browse the repository at this point in the history
  • Loading branch information
willtai authored Apr 26, 2024
2 parents 267fb72 + ec557f2 commit 126aa48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/neo4j_genai/embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@
# limitations under the License.

from abc import ABC, abstractmethod
from .types import EmbeddingVector


class Embedder(ABC):
"""Interface for embedding models."""

@abstractmethod
def embed_query(self, text: str) -> EmbeddingVector:
def embed_query(self, text: str) -> list[float]:
"""Embed query text.
Args:
text (str): Text to convert to vector embedding
Returns:
EmbeddingVector: A vector embedding.
list[float]: A vector embedding.
"""
4 changes: 0 additions & 4 deletions src/neo4j_genai/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ class VectorSearchRecord(BaseModel):
score: float


class EmbeddingVector(BaseModel):
vector: list[float]


class IndexModel(BaseModel):
driver: Any

Expand Down

0 comments on commit 126aa48

Please sign in to comment.