mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
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:
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user