Skip to content

Class swarmauri_core.chunkers.IChunker.IChunker

swarmauri_core.chunkers.IChunker.IChunker

Bases: ABC

Interface for chunking text into smaller pieces.

This interface defines abstract methods for chunking texts. Implementing classes should provide concrete implementations for these methods tailored to their specific chunking algorithms.

chunk_text abstractmethod

chunk_text(text, *args, **kwargs)
Source code in swarmauri_core/chunkers/IChunker.py
14
15
16
@abstractmethod
def chunk_text(self, text: Union[str, Any], *args, **kwargs) -> List[Any]:
    pass