-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b444891
commit f9dff40
Showing
4 changed files
with
43 additions
and
0 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
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,17 @@ | ||
from unittest import TestCase | ||
|
||
from llama_index.core.indices.vector_store.retrievers.retriever import ( | ||
VectorIndexRetriever, | ||
) | ||
from utils.query_engine import WebsiteQueryEngine | ||
|
||
|
||
class TestNotionQueryEngine(TestCase): | ||
def setUp(self) -> None: | ||
community_id = "sample_community" | ||
self.notion_query_engine = WebsiteQueryEngine(community_id) | ||
|
||
def test_prepare_engine(self): | ||
notion_query_engine = self.notion_query_engine.prepare(testing=True) | ||
print(notion_query_engine.__dict__) | ||
self.assertIsInstance(notion_query_engine.retriever, VectorIndexRetriever) |
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
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,7 @@ | ||
from utils.query_engine.base_qdrant_engine import BaseQdrantEngine | ||
|
||
|
||
class WebsiteQueryEngine(BaseQdrantEngine): | ||
def __init__(self, community_id: str) -> None: | ||
platform_name = "website" | ||
super().__init__(platform_name, community_id) |