-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from Sefaria/feat/semantic-search-local-cluster
Feat/semantic search local cluster
- Loading branch information
Showing
4 changed files
with
789 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from langchain_core.documents import Document | ||
|
||
|
||
class ChunkDocument(Document): | ||
def __eq__(self, other): | ||
"""Overrides the default implementation of equal check.""" | ||
if isinstance(other, Document): | ||
return ( | ||
self.page_content == other.page_content | ||
and self.metadata == other.metadata | ||
) | ||
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.