diff --git a/src/writer/ai.py b/src/writer/ai.py index f045f03c5..bbdbbfbb8 100644 --- a/src/writer/ai.py +++ b/src/writer/ai.py @@ -1546,6 +1546,11 @@ def _convert_argument_to_type(self, value: Any, target_type: str) -> Any: def _check_if_arguments_are_required(self, function_name: str) -> bool: callable_entry = self._callable_registry.get(function_name) + if not callable_entry: + raise RuntimeError( + f"Tried to check arguments of function {function_name} " + + "which is not present in the conversation's callable registry." + ) callable_parameters = callable_entry.get("parameters") return \ callable_parameters is not None \