Skip to content

The agent engineering platform.

deprecate community docugami loader (#19230)

Kenzie Mihardja21f75991d4ed
diff --git a/docs/docs/integrations/document_loaders/docugami.ipynb b/docs/docs/integrations/document_loaders/docugami.ipynb
index a307c2b9bd..65b53b67e5 100644
--- a/docs/docs/integrations/document_loaders/docugami.ipynb
+++ b/docs/docs/integrations/document_loaders/docugami.ipynb
@@ -22,7 +22,7 @@
"outputs": [],
"source": [
"# You need the dgml-utils package to use the DocugamiLoader (run pip install directly without \"poetry run\" if you are not using poetry)\n",
- "!poetry run pip install dgml-utils==0.3.0 --upgrade --quiet"
+ "!poetry run pip install docugami-langchain dgml-utils==0.3.0 --upgrade --quiet"
]
},
{
@@ -56,7 +56,7 @@
"source": [
"import os\n",
"\n",
- "from langchain_community.document_loaders import DocugamiLoader"
+ "from docugami_langchain.document_loaders import DocugamiLoader"
]
},
{
@@ -470,7 +470,7 @@
"source": [
"from typing import Dict, List\n",
"\n",
- "from langchain_community.document_loaders import DocugamiLoader\n",
+ "from docugami_langchain.document_loaders import DocugamiLoader\n",
"from langchain_core.documents import Document\n",
"\n",
"loader = DocugamiLoader(docset_id=\"zo954yqy53wp\")\n",
@@ -655,7 +655,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.1"
+ "version": "3.9.18"
}
},
"nbformat": 4,
diff --git a/docs/docs/integrations/providers/docugami.mdx b/docs/docs/integrations/providers/docugami.mdx
index a9689ecdd3..dcd0566c4a 100644
--- a/docs/docs/integrations/providers/docugami.mdx
+++ b/docs/docs/integrations/providers/docugami.mdx
@@ -9,6 +9,7 @@
```bash
pip install dgml-utils
+pip install docugami-langchain
```
## Document Loader
@@ -16,5 +17,5 @@ pip install dgml-utils
See a [usage example](/docs/integrations/document_loaders/docugami).
```python
-from langchain_community.document_loaders import DocugamiLoader
+from docugami_langchain.document_loaders import DocugamiLoader
```
diff --git a/libs/community/langchain_community/document_loaders/docugami.py b/libs/community/langchain_community/document_loaders/docugami.py
index 9e3acd7324..e7256e9685 100644
--- a/libs/community/langchain_community/document_loaders/docugami.py
+++ b/libs/community/langchain_community/document_loaders/docugami.py
@@ -6,6 +6,7 @@ from pathlib import Path
from typing import Any, Dict, List, Mapping, Optional, Sequence, Union
import requests
+from langchain_core._api.deprecation import deprecated
from langchain_core.documents import Document
from langchain_core.pydantic_v1 import BaseModel, root_validator
@@ -26,6 +27,11 @@ DEFAULT_API_ENDPOINT = "https://api.docugami.com/v1preview1"
logger = logging.getLogger(__name__)
+@deprecated(
+ since="0.0.24",
+ removal="0.2.0",
+ alternative_import="docugami_langchain.DocugamiLoader",
+)
class DocugamiLoader(BaseLoader, BaseModel):
"""Load from `Docugami`.