mirror of
https://github.com/open-webui/open-webui
synced 2024-12-28 14:52:23 +00:00
Merge pull request #7875 from MooreDerek/Fix-File-Upload-Logging
Chore: Tika file upload - only log file contents in debug
This commit is contained in:
commit
4a7c1d8d55
@ -20,6 +20,7 @@ from langchain_community.document_loaders import (
|
||||
from langchain_core.documents import Document
|
||||
from open_webui.env import SRC_LOG_LEVELS
|
||||
|
||||
logging.basicConfig(stream=sys.stdout, level=GLOBAL_LOG_LEVEL)
|
||||
log = logging.getLogger(__name__)
|
||||
log.setLevel(SRC_LOG_LEVELS["RAG"])
|
||||
|
||||
@ -106,7 +107,7 @@ class TikaLoader:
|
||||
if "Content-Type" in raw_metadata:
|
||||
headers["Content-Type"] = raw_metadata["Content-Type"]
|
||||
|
||||
log.info("Tika extracted text: %s", text)
|
||||
log.debug("Tika extracted text: %s", text)
|
||||
|
||||
return [Document(page_content=text, metadata=headers)]
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user