项目文件夹

文件
wehub-resource-sync da6a09ff09
Auto Bump and Release / auto-bump-and-release (push) Has been cancelled
style-check / pre-commit (push) Has been cancelled
unit-test / unit testing with python (push) Has been cancelled
unit-test / unit testing with python 3.10 (push) Has been cancelled
unit-test / unit testing with python 3.11 (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:39:49 +08:00

16 行
464 B
Python

from pathlib import Path
from kotaemon.indices.ingests import DocumentIngestor
from kotaemon.indices.splitters import TokenSplitter
def test_ingestor_include_src():
dirpath = Path(__file__).parent
ingestor = DocumentIngestor(
pdf_mode="normal",
text_splitter=TokenSplitter(chunk_size=200, chunk_overlap=10),
)
nodes = ingestor(dirpath / "resources" / "table.pdf")
assert type(nodes) is list
assert nodes[0].relationships