[docs]classGutenbergLoader(BaseLoader):"""Load from `Gutenberg.org`."""
[docs]def__init__(self,file_path:str):"""Initialize with a file path."""ifnotfile_path.startswith("https://www.gutenberg.org"):raiseValueError("file path must start with 'https://www.gutenberg.org'")ifnotfile_path.endswith(".txt"):raiseValueError("file path must end with '.txt'")self.file_path=file_path