fix(tool): add list_tools() method to ToolSet

Commit 292199dc renamed tools.func_list -> tools.list_tools() in
openai_source.py but forgot to add the list_tools() method to the
ToolSet class, causing AttributeError at runtime.
This commit is contained in:
LIghtJUNction
2026-03-26 21:02:02 +08:00
parent 75089b1d1c
commit 37f7b43d6e

View File

@@ -216,6 +216,10 @@ class ToolSet:
"""Get the list of function tools."""
return self.tools
def list_tools(self) -> list[FunctionTool]:
"""Get the list of function tools (alias for func_list)."""
return self.tools
def openai_schema(self, omit_empty_parameter_field: bool = False) -> list[dict]:
"""Convert tools to OpenAI API function calling schema format."""
result = []