langchain.document_loaders.github.BaseGitHubLoader¶
- class langchain.document_loaders.github.BaseGitHubLoader(*, repo: str, access_token: str)[source]¶
Bases:
BaseLoader,BaseModel,ABCLoad issues of a GitHub repository.
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 https://github.com/settings/tokens?type=beta
- param repo: str [Required]¶
Name of repository
- load_and_split(text_splitter: Optional[TextSplitter] = None) List[Document]¶
Load Documents and split into chunks. Chunks are returned as Documents.
- Parameters
text_splitter – TextSplitter instance to use for splitting documents. Defaults to RecursiveCharacterTextSplitter.
- Returns
List of Documents.
- validator validate_environment » all fields[source]¶
Validate that access token exists in environment.
- property headers: Dict[str, str]¶