From c1f4c005515dc702b688bdf1c9a7ad2f554dd745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bj=C3=A4reholt?= Date: Fri, 22 Nov 2024 15:30:38 +0100 Subject: [PATCH] feat(cli): print return values from tool function calls Improves feedback by showing return values from tool functions instead of silently discarding them. --- gptme/util/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gptme/util/cli.py b/gptme/util/cli.py index 8f4eddb3..f6d6caab 100644 --- a/gptme/util/cli.py +++ b/gptme/util/cli.py @@ -229,7 +229,8 @@ def tools_call(tool_name: str, function_name: str, arg: list[str]): for arg_str in arg: key, value = arg_str.split("=", 1) kwargs[key] = value - function[0](**kwargs) + return_val = function[0](**kwargs) + print(return_val) if __name__ == "__main__":