chore: load chunker from config (#270)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import unittest
|
||||
|
||||
from embedchain.chunkers.text import TextChunker
|
||||
from embedchain.config import ChunkerConfig
|
||||
|
||||
|
||||
class TestTextChunker(unittest.TestCase):
|
||||
@@ -11,11 +12,7 @@ class TestTextChunker(unittest.TestCase):
|
||||
Test the chunks generated by TextChunker.
|
||||
# TODO: Not a very precise test.
|
||||
"""
|
||||
chunker_config = {
|
||||
"chunk_size": 10,
|
||||
"chunk_overlap": 0,
|
||||
"length_function": len,
|
||||
}
|
||||
chunker_config = ChunkerConfig(chunk_size=10, chunk_overlap=0, length_function=len)
|
||||
chunker = TextChunker(config=chunker_config)
|
||||
text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user