mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-13 14:50:00 +00:00
deprecate community docugami loader (#19230)
Thank you for contributing to LangChain! - [x] **PR title**: "community: deprecate DocugamiLoader" - [x] **PR message**: Deprecate the langchain_community and use the docugami_langchain DocugamiLoader --------- Co-authored-by: Kenzie Mihardja <kenzie28@cs.washington.edu>
This commit is contained in:
parent
ec026004cb
commit
21f75991d4
@ -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,
|
||||
|
@ -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
|
||||
```
|
||||
|
@ -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`.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user