(self, **data)
| 42 | config: PackConfig = Field(default_factory=PackConfig.global_config) |
| 43 | |
| 44 | def __init__(self, **data): |
| 45 | super().__init__(**data) |
| 46 | if not self.config.filesystem_manager: |
| 47 | self.config.init_filesystem_manager() |
| 48 | |
| 49 | if self.llm and not callable(self.llm): |
| 50 | raise TypeError(f"LLM object {self.llm} must be callable") |
| 51 | |
| 52 | if self.allm and not iscoroutinefunction(self.allm): |
| 53 | raise TypeError(f"Async LLM object {self.llm} must be async and callable") |
| 54 | |
| 55 | if self.name is None: |
| 56 | raise TypeError(f"Class {self.__class__.__name__} must define 'name' as a class variable") |
| 57 | if self.description is None: |
| 58 | raise TypeError(f"Class {self.__class__.__name__} must define 'description' as a class variable") |
| 59 | |
| 60 | def run(self, *args, **kwargs) -> str: |
| 61 | """Execute the _run function of the subclass, verifying the arguments. (Will eventually do callbacks or some |
nothing calls this directly
no test coverage detected