mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-02 11:39:18 +00:00
community[patch]: Add Pagination to GitHubIssuesLoader for Efficient GitHub Issues Retrieval (#16934)
- **Description:** Add Pagination to GitHubIssuesLoader for Efficient GitHub Issues Retrieval - **Issue:** [the issue # it fixes if applicable,](https://github.com/langchain-ai/langchain/issues/16864) --------- Co-authored-by: root <root@ip-172-31-46-160.ap-southeast-1.compute.internal> Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
@@ -2,11 +2,17 @@ from langchain_community.document_loaders.github import GitHubIssuesLoader
|
||||
|
||||
|
||||
def test_issues_load() -> None:
|
||||
title = "DocumentLoader for GitHub"
|
||||
title = " Add caching to BaseChatModel (issue #1644)"
|
||||
loader = GitHubIssuesLoader(
|
||||
repo="langchain-ai/langchain", creator="UmerHA", state="all"
|
||||
repo="langchain-ai/langchain",
|
||||
creator="UmerHA",
|
||||
state="all",
|
||||
per_page=3,
|
||||
page=2,
|
||||
access_token="""""",
|
||||
)
|
||||
docs = loader.load()
|
||||
titles = [d.metadata["title"] for d in docs]
|
||||
assert title in titles
|
||||
assert all(doc.metadata["creator"] == "UmerHA" for doc in docs)
|
||||
assert len(docs) == 3
|
||||
|
Reference in New Issue
Block a user