llama-index readers github integration
Project description
LlamaIndex Readers Integration: Github
pip install llama-index-readers-github
The github readers package consists of three separate readers:
- Repository Reader
- Issues Reader
- Collaborators Reader
All three readers will require a personal access token (which you can generate under your account settings).
Repository Reader
This reader will read through a repo, with options to specifically filter directories and file extensions.
from llama_index.readers.github import GithubRepositoryReader, GithubClient
client = github_client = GithubClient(github_token=github_token, verbose=False)
reader = GithubRepositoryReader(
github_client=github_client,
owner="run-llama",
repo="llama_index",
use_parser=False,
verbose=True,
filter_directories=(
["docs"],
GithubRepositoryReader.FilterType.INCLUDE,
),
filter_file_extensions=(
[
".png",
".jpg",
".jpeg",
".gif",
".svg",
".ico",
"json",
".ipynb",
],
GithubRepositoryReader.FilterType.EXCLUDE,
),
)
documents = reader.load_data(branch="main")
Issues Reader
from llama_index.readers.github import (
GitHubRepositoryIssuesReader,
GitHubIssuesClient,
)
github_client = GitHubIssuesClient(github_token=github_token, verbose=True)
reader = GitHubRepositoryIssuesReader(
github_client=github_client,
owner="moncho",
repo="dry",
verbose=True,
)
documents = reader.load_data(
state=GitHubRepositoryIssuesReader.IssueState.ALL,
labelFilters=[("bug", GitHubRepositoryIssuesReader.FilterType.INCLUDE)],
)
Collaborators Reader
from llama_index.readers.github import (
GitHubRepositoryCollaboratorsReader,
GitHubCollaboratorsClient,
)
github_client = GitHubCollaboratorsClient(
github_token=github_token, verbose=True
)
reader = GitHubRepositoryCollaboratorsReader(
github_client=github_client,
owner="moncho",
repo="dry",
verbose=True,
)
documents = reader.load_data()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for llama_index_readers_github-0.1.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b189fc84979775bd64648e70484a786d25eda68f7247b9b84f7a25be1110f9c |
|
MD5 | 47c065ff2b4bfa6b9aa5cfd13308464c |
|
BLAKE2b-256 | 04f3a23a185768536af7b2d4839f0dad43f11262c1b1f531bc2cba2e0145ff44 |
Close
Hashes for llama_index_readers_github-0.1.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ef032ea4097ab2f7a879be588818e14a01ebac951bec64da38fed0d247c6ba7 |
|
MD5 | 846788c3e3ebe3d3d7d6bc1152b61bad |
|
BLAKE2b-256 | 2288c48a9ebc9f872d4a531f17b9d98947f5fb6c2ace85b7d2df0276645f0623 |