Browse Source

enh: tool __id__ param support for cache dir

Timothy J. Baek 10 months ago
parent
commit
dcac1a3cb7
1 changed files with 7 additions and 0 deletions
  1. 7 0
      backend/main.py

+ 7 - 0
backend/main.py

@@ -280,6 +280,13 @@ async def get_function_call_response(
                             "__files__": files,
                         }
 
+                    if "__id__" in sig.parameters:
+                        # Call the function with the '__id__' parameter included
+                        params = {
+                            **params,
+                            "__id__": tool_id,
+                        }
+
                     function_result = function(**params)
                 except Exception as e:
                     print(e)