The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
clean up loaders (#1178)
Harrison Chase4766b20223c8
diff --git a/langchain/document_loaders/azlyrics.py b/langchain/document_loaders/azlyrics.pyindex 538fc3805d..0947946c11 100644--- a/langchain/document_loaders/azlyrics.py+++ b/langchain/document_loaders/azlyrics.py@@ -8,10 +8,6 @@ from langchain.document_loaders.web_base import WebBaseLoaderclass AZLyricsLoader(WebBaseLoader):"""Loader that loads AZLyrics webpages."""- def __init__(self, web_path: str):- """Initialize with webpage path."""- self.web_path = web_path-def load(self) -> List[Document]:"""Load webpage."""soup = self.scrape()diff --git a/langchain/document_loaders/college_confidential.py b/langchain/document_loaders/college_confidential.pyindex 15bb7512fe..1eaa64bcb2 100644--- a/langchain/document_loaders/college_confidential.py+++ b/langchain/document_loaders/college_confidential.py@@ -8,10 +8,6 @@ from langchain.document_loaders.web_base import WebBaseLoaderclass CollegeConfidentialLoader(WebBaseLoader):"""Loader that loads College Confidential webpages."""- def __init__(self, web_path: str):- """Initialize with webpage path."""- self.web_path = web_path-def load(self) -> List[Document]:"""Load webpage."""soup = self.scrape()diff --git a/langchain/document_loaders/imsdb.py b/langchain/document_loaders/imsdb.pyindex 9084895a05..4589553d33 100644--- a/langchain/document_loaders/imsdb.py+++ b/langchain/document_loaders/imsdb.py@@ -8,10 +8,6 @@ from langchain.document_loaders.web_base import WebBaseLoaderclass IMSDbLoader(WebBaseLoader):"""Loader that loads IMSDb webpages."""- def __init__(self, web_path: str):- """Initialize with webpage path."""- self.web_path = web_path-def load(self) -> List[Document]:"""Load webpage."""soup = self.scrape()diff --git a/langchain/document_loaders/powerpoint.py b/langchain/document_loaders/powerpoint.pyindex d3443ec764..9ed230b2b3 100644--- a/langchain/document_loaders/powerpoint.py+++ b/langchain/document_loaders/powerpoint.py@@ -2,18 +2,19 @@import osfrom typing import List-from unstructured.__version__ import __version__ as __unstructured_version__-from unstructured.file_utils.filetype import FileType, detect_filetype-from langchain.document_loaders.unstructured import UnstructuredFileLoader-unstructured_version = tuple([int(x) for x in __unstructured_version__.split(".")])-class UnstructuredPowerPointLoader(UnstructuredFileLoader):"""Loader that uses unstructured to load powerpoint files."""def _get_elements(self) -> List:+ from unstructured.__version__ import __version__ as __unstructured_version__+ from unstructured.file_utils.filetype import FileType, detect_filetype++ unstructured_version = tuple(+ [int(x) for x in __unstructured_version__.split(".")]+ )# NOTE(MthwRobinson) - magic will raise an import error if the libmagic# system dependency isn't installed. If it's not installed, we'll just# check the file extension