mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-22 14:49:29 +00:00
CR feedback
This commit is contained in:
parent
5919c0f4a2
commit
5cd244e9b7
@ -19,18 +19,10 @@
|
|||||||
"metadata": {
|
"metadata": {
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"Requirement already satisfied: lxml in /root/Source/github/docugami.langchain/libs/langchain/.venv/lib/python3.9/site-packages (4.9.3)\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"# You need the lxml package to use the DocugamiLoader\n",
|
"# You need the lxml package to use the DocugamiLoader\n",
|
||||||
"!poetry run pip install lxml"
|
"!poetry run pip install lxml --quiet"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -147,6 +147,7 @@ class DocugamiLoader(BaseLoader, BaseModel):
|
|||||||
metadata = {
|
metadata = {
|
||||||
XPATH_KEY: _xpath_for_chunk(node),
|
XPATH_KEY: _xpath_for_chunk(node),
|
||||||
DOCUMENT_ID_KEY: document[DOCUMENT_ID_KEY],
|
DOCUMENT_ID_KEY: document[DOCUMENT_ID_KEY],
|
||||||
|
DOCUMENT_NAME_KEY: document[DOCUMENT_NAME_KEY],
|
||||||
DOCUMENT_SOURCE_KEY: document[DOCUMENT_NAME_KEY],
|
DOCUMENT_SOURCE_KEY: document[DOCUMENT_NAME_KEY],
|
||||||
STRUCTURE_KEY: node.attrib.get("structure", ""),
|
STRUCTURE_KEY: node.attrib.get("structure", ""),
|
||||||
TAG_KEY: re.sub(r"\{.*\}", "", node.tag),
|
TAG_KEY: re.sub(r"\{.*\}", "", node.tag),
|
||||||
|
Loading…
Reference in New Issue
Block a user