From dcac1a3cb70b8b3bfa5fd1badf274b8d0a0773e7 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Tue, 18 Jun 2024 18:14:18 -0700 Subject: [PATCH] enh: tool __id__ param support for cache dir --- backend/main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/main.py b/backend/main.py index b14d56436..147cf77e8 100644 --- a/backend/main.py +++ b/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)