From 37285b8749acc5b353b03bec958cfa64ee883908 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 8 Jul 2024 21:52:23 -0700 Subject: [PATCH] fix: do not include reserved params in specs --- backend/utils/tools.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/utils/tools.py b/backend/utils/tools.py index c1c41ed37..3e5d82fd6 100644 --- a/backend/utils/tools.py +++ b/backend/utils/tools.py @@ -59,7 +59,10 @@ def get_tools_specs(tools) -> List[dict]: for param_name, param_annotation in get_type_hints( function ).items() - if param_name != "return" and param_name != "__user__" + if param_name != "return" + and not ( + param_name.startswith("__") and param_name.endswith("__") + ) }, "required": [ name