Skip to main content

agrag.chunking.rules.RuleMatch

Bases: BaseModel

The documents a rule applies to.

Every key is optional and a key left as None matches any value. Keys combine with AND. A value in a list key matches if it equals any item of the list.

Attributes:

Functions:

  • matches – Return whether every set key matches the document.

families​

families: tuple[DocumentFamily, ...] | None = None

loader_names​

loader_names: tuple[str, ...] | None = None

matches​

matches(document:Document) -> bool

Return whether every set key matches the document.

model_config​

model_config = ConfigDict(frozen=True, extra='forbid')

source_formats​

source_formats: tuple[SourceFormat, ...] | None = None

uri_glob​

uri_glob: str | None = None