-
Notifications
You must be signed in to change notification settings - Fork 144
Bug fixes #428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug fixes #428
Changes from all commits
a7ab4f9
fcc99e0
af966cc
cd97efc
c520978
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,6 @@ | |
# limitations under the License. | ||
from __future__ import annotations | ||
|
||
from abc import ABC, abstractmethod | ||
from typing import Optional | ||
|
||
from neo4j_graphrag.utils.rate_limit import ( | ||
|
@@ -24,7 +23,7 @@ | |
) | ||
|
||
|
||
class Embedder(ABC): | ||
class Embedder: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we care about things lost when we remove inheritance from ABC? less safety and early error handling? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, the only other solution I can think of is to create a |
||
""" | ||
Interface for embedding models. | ||
An embedder passed into a retriever must implement this interface. | ||
|
@@ -51,7 +50,6 @@ def embed_query(self, text: str) -> list[float]: | |
""" | ||
return self._embed_query(text) | ||
|
||
@abstractmethod | ||
def _embed_query(self, text: str) -> list[float]: | ||
"""Embed query text. | ||
|
||
|
@@ -61,3 +59,4 @@ def _embed_query(self, text: str) -> list[float]: | |
Returns: | ||
list[float]: A vector embedding. | ||
""" | ||
raise NotImplementedError() |
Uh oh!
There was an error while loading. Please reload this page.