diff --git a/libs/community/langchain_community/document_loaders/pdf.py b/libs/community/langchain_community/document_loaders/pdf.py index b01ffea8efcaa..528d34c43b92a 100644 --- a/libs/community/langchain_community/document_loaders/pdf.py +++ b/libs/community/langchain_community/document_loaders/pdf.py @@ -178,7 +178,7 @@ class PyPDFLoader(BasePDFLoader): loader = PyPDFLoader( file_path = "./example_data/layout-parser-paper.pdf", - password = "my-pasword", + password = "my-password", extract_images = True, # headers = None # extraction_mode = "plain", @@ -572,7 +572,8 @@ def get_processed_pdf(self, pdf_id: str) -> str: response = requests.get(url, headers=self._mathpix_headers) return response.content.decode("utf-8") - def clean_pdf(self, contents: str) -> str: + @staticmethod + def clean_pdf(contents: str) -> str: """Clean the PDF file. Args: diff --git a/libs/text-splitters/langchain_text_splitters/character.py b/libs/text-splitters/langchain_text_splitters/character.py index 85124b39de924..f65c38869d394 100644 --- a/libs/text-splitters/langchain_text_splitters/character.py +++ b/libs/text-splitters/langchain_text_splitters/character.py @@ -465,7 +465,7 @@ def get_separators_for_language(language: Language) -> List[str]: "\n\\\\begin{verse}", "\n\\\\begin{verbatim}", # Now split by math environments - "\n\\\begin{align}", + "\n\\\\begin{align}", "$$", "$", # Now split by the normal type of lines