(self, *args: Any, **kwargs: Any)
| 383 | ) |
| 384 | |
| 385 | def __call__(self, *args: Any, **kwargs: Any) -> Any: |
| 386 | if self.synthesize_output: |
| 387 | result = self.synthesize_execution_output(args, kwargs) |
| 388 | return result |
| 389 | else: |
| 390 | # Pass the extracted arguments to the indicated function |
| 391 | try: |
| 392 | result = self.func(*args, **kwargs) |
| 393 | return result |
| 394 | except Exception as e: |
| 395 | raise ValueError( |
| 396 | f"Execution of function {self.func.__name__} failed with " |
| 397 | f"arguments {args} and {kwargs}. " |
| 398 | f"Error: {e}" |
| 399 | ) |
| 400 | |
| 401 | @staticmethod |
| 402 | def validate_openai_tool_schema( |
nothing calls this directly
no test coverage detected