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.5.0.tar.gz
.
File metadata
- Download URL: llama_index_readers_github-0.5.0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4468e9b5eaa6938ac88cfcb7017902c7aeb3906f6661439d3fdf73e2c1ba2870 |
|
MD5 | 7e40aa71284831200e68763d9e6b408d |
|
BLAKE2b-256 | 9e8c9a71362084b1cab15a0bdfc510f47bb784caf8bb1d9a9527063e1f7fa8a5 |
File details
Details for the file llama_index_readers_github-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_readers_github-0.5.0-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b23a5665511d1aca5105d23bbbd3dba9427d59ac1ac28411637c8ac80f7d252 |
|
MD5 | dab72ef5e7d36dab3f33bd7ee977262e |
|
BLAKE2b-256 | d54be0a138eee5fd9b4230fe2c9f369362d8895622d77ece8f4a59ded19c3ec3 |