mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-08 12:48:28 +00:00
chore: update Milvus on examples and references to deprecated method (#2664)
* docs(examples): update the set up of Milvus Lite Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com> * chore: remove references to deprecated save_as_document_tokens Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com> --------- Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
This commit is contained in:
committed by
GitHub
parent
ce5a099dfd
commit
54e65d9511
@@ -280,7 +280,7 @@ def export_documents(
|
|||||||
if export_doctags:
|
if export_doctags:
|
||||||
fname = output_dir / f"{doc_filename}.doctags"
|
fname = output_dir / f"{doc_filename}.doctags"
|
||||||
_log.info(f"writing Doc Tags output to {fname}")
|
_log.info(f"writing Doc Tags output to {fname}")
|
||||||
conv_res.document.save_as_document_tokens(filename=fname)
|
conv_res.document.save_as_doctags(filename=fname)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
_log.warning(f"Document {conv_res.input.file} failed to convert.")
|
_log.warning(f"Document {conv_res.input.file} failed to convert.")
|
||||||
|
|||||||
4
docs/examples/batch_convert.py
vendored
4
docs/examples/batch_convert.py
vendored
@@ -79,7 +79,7 @@ def export_documents(
|
|||||||
output_dir / f"{doc_filename}.html",
|
output_dir / f"{doc_filename}.html",
|
||||||
image_mode=ImageRefMode.EMBEDDED,
|
image_mode=ImageRefMode.EMBEDDED,
|
||||||
)
|
)
|
||||||
conv_res.document.save_as_document_tokens(
|
conv_res.document.save_as_doctags(
|
||||||
output_dir / f"{doc_filename}.doctags.txt"
|
output_dir / f"{doc_filename}.doctags.txt"
|
||||||
)
|
)
|
||||||
conv_res.document.save_as_markdown(
|
conv_res.document.save_as_markdown(
|
||||||
@@ -98,7 +98,7 @@ def export_documents(
|
|||||||
|
|
||||||
# Export Docling document format to doctags:
|
# Export Docling document format to doctags:
|
||||||
with (output_dir / f"{doc_filename}.doctags.txt").open("w") as fp:
|
with (output_dir / f"{doc_filename}.doctags.txt").open("w") as fp:
|
||||||
fp.write(conv_res.document.export_to_document_tokens())
|
fp.write(conv_res.document.export_to_doctags())
|
||||||
|
|
||||||
# Export Docling document format to markdown:
|
# Export Docling document format to markdown:
|
||||||
with (output_dir / f"{doc_filename}.md").open("w") as fp:
|
with (output_dir / f"{doc_filename}.md").open("w") as fp:
|
||||||
|
|||||||
2
docs/examples/rag_haystack.ipynb
vendored
2
docs/examples/rag_haystack.ipynb
vendored
@@ -85,7 +85,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"%pip install -q --progress-bar off --no-warn-conflicts docling-haystack haystack-ai docling pymilvus milvus-haystack sentence-transformers python-dotenv"
|
"%pip install -q --progress-bar off --no-warn-conflicts docling-haystack haystack-ai docling \"pymilvus[milvus-lite]\" milvus-haystack sentence-transformers python-dotenv"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
2
docs/examples/rag_milvus.ipynb
vendored
2
docs/examples/rag_milvus.ipynb
vendored
@@ -52,7 +52,7 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"! pip install --upgrade pymilvus docling openai torch"
|
"! pip install --upgrade \"pymilvus[milvus-lite]\" docling openai torch"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user