diff --git a/funcchain/parser.py b/funcchain/parser.py index aacca6b..8a43acc 100644 --- a/funcchain/parser.py +++ b/funcchain/parser.py @@ -63,8 +63,8 @@ def _pre_parse_function_call(self, result: list[Generation]) -> dict: message = generation.message try: func_call = copy.deepcopy(message.additional_kwargs["function_call"]) - except KeyError as exc: - raise OutputParserException(f"Could not parse function call: {exc}") + except KeyError: + raise OutputParserException(f"The model refused to respond with a function call:\n{message.content}\n\n") return func_call