mirror of
https://github.com/open-webui/open-webui
synced 2025-06-08 23:47:14 +00:00
Fix: Tika 3.1.0.0 sends a lot of blank lines which degrades the RAG results, strip them.
This commit is contained in:
parent
4906af9319
commit
115e46a6a2
@ -105,7 +105,7 @@ class TikaLoader:
|
|||||||
|
|
||||||
if r.ok:
|
if r.ok:
|
||||||
raw_metadata = r.json()
|
raw_metadata = r.json()
|
||||||
text = raw_metadata.get("X-TIKA:content", "<No text content found>")
|
text = raw_metadata.get("X-TIKA:content", "<No text content found>").strip()
|
||||||
|
|
||||||
if "Content-Type" in raw_metadata:
|
if "Content-Type" in raw_metadata:
|
||||||
headers["Content-Type"] = raw_metadata["Content-Type"]
|
headers["Content-Type"] = raw_metadata["Content-Type"]
|
||||||
|
Loading…
Reference in New Issue
Block a user