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.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed4bb655a071b5681fe61a6ea5562f6b8c5aec068057cb1dfb05a1d75fc959ac |
|
MD5 | 0017f060f6e57549ea4e93227e964950 |
|
BLAKE2b-256 | 29d8f228f3f62ad1dd9387a2cecbb9efd1c191f5fb33e4f0d24ec6f222aa321f |
Close
Hashes for llama_index_readers_github-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3042a69412cde2e6ced45b8aa051e5fb849fd960fb4dfaad54e9e22853d6d5d |
|
MD5 | 8b0cc9ba8657e740f15805c347fe0ecd |
|
BLAKE2b-256 | 0be5183e29af3a26fa4b6e022d0f4c71c6ecd84730d2af2c2f777e7a085e98c4 |