Skip to content

Commit

Permalink
feat(cli): print return values from tool function calls
Browse files Browse the repository at this point in the history
Improves feedback by showing return values from tool functions instead of
silently discarding them.
  • Loading branch information
ErikBjare committed Nov 22, 2024
1 parent e1e2943 commit c1f4c00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gptme/util/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__":
Expand Down

0 comments on commit c1f4c00

Please sign in to comment.