Skip to content

Commit

Permalink
fix: missing Telegram query engine!
Browse files Browse the repository at this point in the history
  • Loading branch information
amindadgar committed Oct 22, 2024
1 parent b3b9e28 commit 4d137c2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion subquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
GitHubQueryEngine,
MediaWikiQueryEngine,
NotionQueryEngine,
TelegramQueryEngine,
prepare_discord_engine_auto_filter,
)

Expand Down Expand Up @@ -133,7 +134,7 @@ def query_multiple_source(
)
)
if telegram and check_collection("telegram"):
telegram_query_engine = GitHubQueryEngine(community_id=community_id).prepare()
telegram_query_engine = TelegramQueryEngine(community_id=community_id).prepare()
tool_metadata = ToolMetadata(
name="Telegram",
description=(
Expand Down
1 change: 1 addition & 0 deletions utils/query_engine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
from .github import GitHubQueryEngine
from .media_wiki import MediaWikiQueryEngine
from .notion import NotionQueryEngine
from .telegram import TelegramQueryEngine
from .prepare_discord_query_engine import prepare_discord_engine_auto_filter
from .subquery_gen_prompt import DEFAULT_GUIDANCE_SUB_QUESTION_PROMPT_TMPL
7 changes: 7 additions & 0 deletions utils/query_engine/telegram.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from utils.query_engine.base_qdrant_engine import BaseQdrantEngine


class TelegramQueryEngine(BaseQdrantEngine):
def __init__(self, community_id: str) -> None:
platform_name = "telegram"
super().__init__(platform_name, community_id)

0 comments on commit 4d137c2

Please sign in to comment.