GithubFileLoader#
- class langchain_community.document_loaders.github.GithubFileLoader[source]#
Bases:
BaseGitHubLoader
,ABC
Load GitHub File
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- param access_token: str [Required]#
Personal access token - see settings/tokens
- param branch: str = 'main'#
- param file_filter: Callable[[str], bool] | None = None#
- param github_api_url: str = 'https://api.github.com'#
URL of GitHub API
- param repo: str [Required]#
Name of repository
- async alazy_load() AsyncIterator[Document] #
A lazy loader for Documents.
- Return type:
AsyncIterator[Document]
- lazy_load() Iterator[Document] [source]#
A lazy loader for Documents.
- Return type:
Iterator[Document]
- load_and_split(text_splitter: TextSplitter | None = None) List[Document] #
Load Documents and split into chunks. Chunks are returned as Documents.
Do not override this method. It should be considered to be deprecated!
- Parameters:
text_splitter (Optional[TextSplitter]) – TextSplitter instance to use for splitting documents. Defaults to RecursiveCharacterTextSplitter.
- Returns:
List of Documents.
- Return type:
List[Document]
- property headers: Dict[str, str]#
Examples using GithubFileLoader