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
File details
Details for the file llama_index_readers_github-0.3.0.tar.gz
.
File metadata
- Download URL: llama_index_readers_github-0.3.0.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a84524d83582d0f91122701c8fbeef98bc907b2b894440195d41d975832c1350 |
|
MD5 | fd9bba7e80f30673c45bc6499169797b |
|
BLAKE2b-256 | 22bdd8c3e05a543170601de005aa2972f96355df014448a751092993a4c2e35a |
File details
Details for the file llama_index_readers_github-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_readers_github-0.3.0-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a271e337a6c74f33e1d57f6ebe8799943930f9295057f0cb1dc9e9a7236ee0a4 |
|
MD5 | bd4c81c5e44fed885179af301da64575 |
|
BLAKE2b-256 | da4dce9f9bf1442493700824806db8ac09520b587c8a80661d8e7f63367a4fd7 |