Harrison/telegram chat loader (#4698)

Co-authored-by: Akinwande Komolafe <47945512+Sensei-akin@users.noreply.github.com>
Co-authored-by: Akinwande Komolafe <akhinoz@gmail.com>
This commit is contained in:
Harrison Chase
2023-05-14 22:04:27 -07:00
committed by GitHub
parent 2b181e5a6c
commit 12b4ee1fc7
4 changed files with 263 additions and 12 deletions

View File

@@ -1,12 +1,12 @@
from pathlib import Path
from langchain.document_loaders import TelegramChatLoader
from langchain.document_loaders import TelegramChatFileLoader
def test_telegram_chat_loader() -> None:
def test_telegram_chat_file_loader() -> None:
"""Test TelegramChatLoader."""
file_path = Path(__file__).parent.parent / "examples/telegram.json"
loader = TelegramChatLoader(str(file_path))
loader = TelegramChatFileLoader(str(file_path))
docs = loader.load()
assert len(docs) == 1