-
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
f32a46f
commit f7d62fd
Showing
4 changed files
with
38 additions
and
2 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,15 @@ | ||
from unittest import TestCase | ||
|
||
from bot.retrievers.custom_retriever import CustomVectorStoreRetriever | ||
from utils.query_engine import MediaWikiQueryEngine | ||
|
||
|
||
class TestMediaWikiQueryEngine(TestCase): | ||
def setUp(self) -> None: | ||
community_id = "sample_community" | ||
self.notion_query_engine = MediaWikiQueryEngine(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, CustomVectorStoreRetriever) |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# flake8: noqa | ||
from .gdrive import GDriveQueryEngine | ||
from .github import GitHubQueryEngine | ||
from .media_wiki import MediaWikiQueryEngine | ||
from .notion import NotionQueryEngine | ||
from .prepare_discord_query_engine import prepare_discord_engine_auto_filter | ||
from .subquery_gen_prompt import DEFAULT_GUIDANCE_SUB_QUESTION_PROMPT_TMPL |
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_engine import BaseEngine | ||
|
||
|
||
class MediaWikiQueryEngine(BaseEngine): | ||
def __init__(self, community_id: str) -> None: | ||
platform_name = "mediawiki" | ||
super().__init__(platform_name, community_id) |