mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
refac
This commit is contained in:
@@ -1409,11 +1409,12 @@ async def process_chat_payload(request, form_data, user, metadata, model):
|
||||
headers=headers if headers else None,
|
||||
)
|
||||
|
||||
function_name_filter_list = (
|
||||
mcp_server_connection.get("config", {})
|
||||
.get("function_name_filter_list", "")
|
||||
.split(",")
|
||||
)
|
||||
function_name_filter_list = mcp_server_connection.get(
|
||||
"config", {}
|
||||
).get("function_name_filter_list", "")
|
||||
|
||||
if isinstance(function_name_filter_list, str):
|
||||
function_name_filter_list = function_name_filter_list.split(",")
|
||||
|
||||
tool_specs = await mcp_clients[server_id].list_tool_specs()
|
||||
for tool_spec in tool_specs:
|
||||
|
||||
@@ -150,11 +150,12 @@ async def get_tools(
|
||||
)
|
||||
|
||||
specs = tool_server_data.get("specs", [])
|
||||
function_name_filter_list = (
|
||||
tool_server_connection.get("config", {})
|
||||
.get("function_name_filter_list", "")
|
||||
.split(",")
|
||||
)
|
||||
function_name_filter_list = tool_server_connection.get(
|
||||
"config", {}
|
||||
).get("function_name_filter_list", "")
|
||||
|
||||
if isinstance(function_name_filter_list, str):
|
||||
function_name_filter_list = function_name_filter_list.split(",")
|
||||
|
||||
for spec in specs:
|
||||
function_name = spec["name"]
|
||||
|
||||
Reference in New Issue
Block a user