mirror of
https://github.com/open-webui/open-webui
synced 2025-03-31 15:52:03 +00:00
refac: allow class in tools
This commit is contained in:
parent
0ac8e97447
commit
e4af3852f7
@ -20,7 +20,9 @@ def get_tools_specs(tools) -> List[dict]:
|
|||||||
function_list = [
|
function_list = [
|
||||||
{"name": func, "function": getattr(tools, func)}
|
{"name": func, "function": getattr(tools, func)}
|
||||||
for func in dir(tools)
|
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 = []
|
specs = []
|
||||||
|
Loading…
Reference in New Issue
Block a user