From 93663784ab2866cc083ce5ac633a61fdf9616d8d Mon Sep 17 00:00:00 2001 From: yzlin Date: Wed, 13 Mar 2024 16:36:34 +0800 Subject: [PATCH] small bug fixes --- metagpt/tools/tool_convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metagpt/tools/tool_convert.py b/metagpt/tools/tool_convert.py index 48c945d9b..42c65b9e7 100644 --- a/metagpt/tools/tool_convert.py +++ b/metagpt/tools/tool_convert.py @@ -12,7 +12,7 @@ def convert_code_to_tool_schema(obj, include: list[str] = None): if inspect.isclass(obj): schema = {"type": "class", "description": remove_spaces(docstring), "methods": {}} for name, method in inspect.getmembers(obj, inspect.isfunction): - if name.startswith("_"): # skip private methodss + if name.startswith("_") and name != "__init__": # skip private methodss continue if include and name not in include: continue