From 0b899044100d9ddfa8e1a1388cf397a8399606b4 Mon Sep 17 00:00:00 2001 From: Nicolas Nahas <45595586+nicorne@users.noreply.github.com> Date: Mon, 5 Aug 2024 15:37:38 +0200 Subject: [PATCH] TOOL_CALLING FIX --- swarms/tools/tool_parse_exec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swarms/tools/tool_parse_exec.py b/swarms/tools/tool_parse_exec.py index 50b78e42..25169939 100644 --- a/swarms/tools/tool_parse_exec.py +++ b/swarms/tools/tool_parse_exec.py @@ -30,8 +30,8 @@ def parse_and_execute_json( function_dict = {func.__name__: func for func in functions} data = json.loads(json_string) - function_list = data.get("functions", []) - + function_list = data.get("functions", []) if data.get("functions") else [data.get("function", [])] + results = {} for function_data in function_list: function_name = function_data.get("name")