Skip to content

Commit

Permalink
Fix imports order
Browse files Browse the repository at this point in the history
  • Loading branch information
pprados committed Dec 19, 2024
1 parent 2d63d62 commit c8ec906
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 61 deletions.
2 changes: 1 addition & 1 deletion docs/docs/how_to/document_loader_pdf.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -475,10 +475,10 @@
}
],
"source": [
"from langchain_openai import ChatOpenAI\n",
"from langchain_community.document_loaders.parsers.pdf import (\n",
" convert_images_to_description,\n",
")\n",
"from langchain_openai import ChatOpenAI\n",
"\n",
"loader = PyPDFLoader(\n",
" file_path,\n",
Expand Down
1 change: 1 addition & 0 deletions docs/docs/integrations/document_loaders/pdfminer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,7 @@
"cell_type": "code",
"source": [
"import os\n",
"\n",
"from dotenv import load_dotenv\n",
"\n",
"load_dotenv()"
Expand Down
5 changes: 3 additions & 2 deletions docs/docs/integrations/document_loaders/pdfplumber.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,7 @@
"cell_type": "code",
"source": [
"import os\n",
"\n",
"from dotenv import load_dotenv\n",
"\n",
"load_dotenv()"
Expand Down Expand Up @@ -871,10 +872,10 @@
},
"cell_type": "code",
"source": [
"from langchain_openai import ChatOpenAI\n",
"from langchain_community.document_loaders.parsers.pdf import (\n",
" convert_images_to_description,\n",
")\n",
"from langchain_openai import ChatOpenAI\n",
"\n",
"loader = PDFPlumberLoader(\n",
" \"./example_data/layout-parser-paper.pdf\",\n",
Expand Down Expand Up @@ -1067,9 +1068,9 @@
},
"cell_type": "code",
"source": [
"from langchain_community.document_loaders.parsers import PDFPlumberParser\n",
"from langchain_community.document_loaders import FileSystemBlobLoader\n",
"from langchain_community.document_loaders.generic import GenericLoader\n",
"from langchain_community.document_loaders.parsers import PDFPlumberParser\n",
"\n",
"loader = GenericLoader(\n",
" blob_loader=FileSystemBlobLoader(\n",
Expand Down
5 changes: 3 additions & 2 deletions docs/docs/integrations/document_loaders/pymupdf.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,7 @@
],
"source": [
"import os\n",
"\n",
"from dotenv import load_dotenv\n",
"\n",
"load_dotenv()"
Expand Down Expand Up @@ -973,10 +974,10 @@
}
],
"source": [
"from langchain_openai import ChatOpenAI\n",
"from langchain_community.document_loaders.parsers.pdf import (\n",
" convert_images_to_description,\n",
")\n",
"from langchain_openai import ChatOpenAI\n",
"\n",
"loader = PyMuPDFLoader(\n",
" \"./example_data/layout-parser-paper.pdf\",\n",
Expand Down Expand Up @@ -1188,9 +1189,9 @@
}
],
"source": [
"from langchain_community.document_loaders.parsers import PyMuPDFParser\n",
"from langchain_community.document_loaders import FileSystemBlobLoader\n",
"from langchain_community.document_loaders.generic import GenericLoader\n",
"from langchain_community.document_loaders.parsers import PyMuPDFParser\n",
"\n",
"loader = GenericLoader(\n",
" blob_loader=FileSystemBlobLoader(\n",
Expand Down
55 changes: 28 additions & 27 deletions docs/docs/integrations/document_loaders/pypdfium2.ipynb

Large diffs are not rendered by default.

53 changes: 27 additions & 26 deletions docs/docs/integrations/document_loaders/pypdfloader.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/docs/integrations/document_loaders/zeroxpdfloader.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@
},
"source": [
"import os\n",
"from dotenv import load_dotenv\n",
"from getpass import getpass\n",
"\n",
"# use nest_asyncio (only necessary inside of jupyter notebook)\n",
"import nest_asyncio\n",
"from dotenv import load_dotenv\n",
"from langchain_community.document_loaders.pdf import ZeroxPDFLoader\n",
"\n",
"nest_asyncio.apply()\n",
"load_dotenv()\n",
"from getpass import getpass\n",
"\n",
"if not os.environ.get(\"OPENAI_API_KEY\"):\n",
" os.environ[\"OPENAI_API_KEY\"] = getpass(\"OpenAI API key =\")\n",
Expand Down Expand Up @@ -368,9 +368,9 @@
},
"cell_type": "code",
"source": [
"from langchain_community.document_loaders.parsers import ZeroxPDFParser\n",
"from langchain_community.document_loaders import FileSystemBlobLoader\n",
"from langchain_community.document_loaders.generic import GenericLoader\n",
"from langchain_community.document_loaders.parsers import ZeroxPDFParser\n",
"\n",
"loader = GenericLoader(\n",
" blob_loader=FileSystemBlobLoader(\n",
Expand Down

0 comments on commit c8ec906

Please sign in to comment.