💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Only add body tags if they don't already exist, closes #919
davidmezzettidd8ff3078a5a
diff --git a/src/python/txtai/pipeline/data/filetohtml.py b/src/python/txtai/pipeline/data/filetohtml.pyindex 15505247..c50ed58f 100644--- a/src/python/txtai/pipeline/data/filetohtml.py+++ b/src/python/txtai/pipeline/data/filetohtml.py@@ -196,8 +196,8 @@ class Docling:normalized html"""- # Wrap content with a body tag- html = html.replace("<head/>", "<head/><body>").replace("</html>", "</body></html>")+ # Wrap content with a body tag, if necessary+ html = html.replace("<head/>", "<head/><body>").replace("</html>", "</body></html>") if "<body>" not in html else html# Remove bullets from list itemshtml = re.sub(r"<li>\xb7 ", r"<li>", html)