(self)
| 53 | self.id = self.id or str(uuid.uuid4()) |
| 54 | |
| 55 | def toJson(self): |
| 56 | return { |
| 57 | "id": self.id, |
| 58 | "fn_name": self.fn_name, |
| 59 | "fn_description": self.fn_description, |
| 60 | "args": [asdict(arg) for arg in self.args], |
| 61 | "hint": self.hint, |
| 62 | "config": asdict(self.config) |
| 63 | } |
| 64 | |
| 65 | def _validate_args(self, *args) -> Dict[str, Any]: |
| 66 | """Validate and convert positional arguments to named arguments""" |