from typing import Any from pydantic import BaseModel class SearchRow(BaseModel): chunk_id: str score: float payload: dict[str, Any] # type: ignore[reportExplicitAny] class Condition(BaseModel): ... class Match(Condition): key: str value: str class MatchAny(Condition): key: str any: list[str] class MatchExclude(Condition): key: str exclude: list[str]