Registry

This module contains functionality related to the the registry module for embedding.splitters.

Registry

SplitterRegistry

Bases: Registry

Registry for document splitters that manages the registration and retrieval of different splitter implementations.

This registry maps SplitterName enum values to their corresponding splitter implementations, allowing for a centralized way to access different text splitting strategies throughout the application.

Attributes:
  • _key_class (Type) –

    The class type used as keys in the registry, set to SplitterName enum.

Source code in src/embedding/splitters/registry.py
 9
10
11
12
13
14
15
16
17
18
19
20
class SplitterRegistry(Registry):
    """
    Registry for document splitters that manages the registration and retrieval of different splitter implementations.

    This registry maps SplitterName enum values to their corresponding splitter implementations,
    allowing for a centralized way to access different text splitting strategies throughout the application.

    Attributes:
        _key_class: The class type used as keys in the registry, set to SplitterName enum.
    """

    _key_class: Type = SplitterName