Skip to main content

Module loader

Module loader 

Source
Expand description

Document loader — reads plain text, Markdown, and PDF files into the knowledge base.

Constants§

KNOWLEDGE_LOAD_FILE_MAX_BYTES
Maximum bytes loaded from a single file by load_file.
KNOWLEDGE_LOAD_URL_MAX_BYTES
Maximum bytes loaded from a single URL by load_url.

Functions§

load_file
Load a single file and index its chunks into the knowledge base under the given tenant.
load_glob
Load all files matching a glob pattern and index their chunks.
load_url
Load a URL, strip HTML tags, and index chunks.
strip_html_tags
Strip HTML tags from text, replacing them with spaces.