diff --git a/aggify/aggify.py b/aggify/aggify.py index 338d2c6..11283c7 100644 --- a/aggify/aggify.py +++ b/aggify/aggify.py @@ -52,7 +52,10 @@ def __init__(self, base_model: Type[Document]): Args: base_model: The base model class. """ - self.base_model = base_model + # Create a separate copy of the main class for safety and flexibility + self.base_model = type( + "Aggify_base_model", base_model.__bases__, dict(base_model.__dict__) + ) self.pipelines: list[dict[str, dict | Any]] = [] self.start = None self.stop = None