mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-03 18:59:38 -05:00
refac
This commit is contained in:
@@ -150,15 +150,15 @@ async def get_tools(
|
||||
)
|
||||
|
||||
specs = tool_server_data.get("specs", [])
|
||||
function_name_filter_list = tool_server_connection.get(
|
||||
"function_name_filter_list", None
|
||||
function_name_filter_list = (
|
||||
tool_server_connection.get("config", {})
|
||||
.get("function_name_filter_list", "")
|
||||
.split(",")
|
||||
)
|
||||
|
||||
for spec in specs:
|
||||
function_name = spec["name"]
|
||||
if function_name_filter_list and isinstance(
|
||||
function_name_filter_list, list
|
||||
):
|
||||
if function_name_filter_list:
|
||||
if not is_string_allowed(
|
||||
function_name, function_name_filter_list
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user