langchain/libs/community/tests/integration_tests/document_loaders/test_larksuite.py
Pengcheng Liu 1fad39be1c
community[minor]: Add LarkSuite wiki document loader. (#21016)
**Description:** Add LarkSuite wiki document loader. Refer to [LarkSuite
api document
](https://open.feishu.cn/document/server-docs/docs/wiki-v2/space-node/list)for
details.
**Issue:** None
**Dependencies:** None
**Twitter handle:** None
2024-04-29 10:37:50 -04:00

27 lines
672 B
Python

from langchain_community.document_loaders.larksuite import (
LarkSuiteDocLoader,
LarkSuiteWikiLoader,
)
DOMAIN = ""
ACCESS_TOKEN = ""
DOCUMENT_ID = ""
def test_larksuite_doc_loader() -> None:
"""Test LarkSuite (FeiShu) document loader."""
loader = LarkSuiteDocLoader(DOMAIN, ACCESS_TOKEN, DOCUMENT_ID)
docs = loader.load()
assert len(docs) == 1
assert docs[0].page_content is not None
def test_larksuite_wiki_loader() -> None:
"""Test LarkSuite (FeiShu) wiki loader."""
loader = LarkSuiteWikiLoader(DOMAIN, ACCESS_TOKEN, DOCUMENT_ID)
docs = loader.load()
assert len(docs) == 1
assert docs[0].page_content is not None