10 lines
311 B
Python
10 lines
311 B
Python
from rag_agent.ingest.chunker import chunk_text
|
|
|
|
|
|
def test_chunk_text_basic():
|
|
text = "one two three four five six seven eight"
|
|
chunks = chunk_text(text, chunk_size=3, overlap=1)
|
|
assert len(chunks) == 3
|
|
assert chunks[0].text == "one two three"
|
|
assert chunks[1].text.startswith("three four")
|