瀏覽代碼

refac: allow class in tools

Timothy J. Baek 10 月之前
父節點
當前提交
e4af3852f7
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      backend/utils/tools.py

+ 3 - 1
backend/utils/tools.py

@@ -20,7 +20,9 @@ def get_tools_specs(tools) -> List[dict]:
     function_list = [
         {"name": func, "function": getattr(tools, func)}
         for func in dir(tools)
-        if callable(getattr(tools, func)) and not func.startswith("__")
+        if callable(getattr(tools, func))
+        and not func.startswith("__")
+        and not inspect.isclass(getattr(tools, func))
     ]
 
     specs = []