mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-11 20:05:19 +00:00
refac
This commit is contained in:
parent
c5b73d7184
commit
477097c2e4
2 changed files with 12 additions and 10 deletions
|
|
@ -1409,11 +1409,12 @@ async def process_chat_payload(request, form_data, user, metadata, model):
|
||||||
headers=headers if headers else None,
|
headers=headers if headers else None,
|
||||||
)
|
)
|
||||||
|
|
||||||
function_name_filter_list = (
|
function_name_filter_list = mcp_server_connection.get(
|
||||||
mcp_server_connection.get("config", {})
|
"config", {}
|
||||||
.get("function_name_filter_list", "")
|
).get("function_name_filter_list", "")
|
||||||
.split(",")
|
|
||||||
)
|
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()
|
tool_specs = await mcp_clients[server_id].list_tool_specs()
|
||||||
for tool_spec in tool_specs:
|
for tool_spec in tool_specs:
|
||||||
|
|
|
||||||
|
|
@ -150,11 +150,12 @@ async def get_tools(
|
||||||
)
|
)
|
||||||
|
|
||||||
specs = tool_server_data.get("specs", [])
|
specs = tool_server_data.get("specs", [])
|
||||||
function_name_filter_list = (
|
function_name_filter_list = tool_server_connection.get(
|
||||||
tool_server_connection.get("config", {})
|
"config", {}
|
||||||
.get("function_name_filter_list", "")
|
).get("function_name_filter_list", "")
|
||||||
.split(",")
|
|
||||||
)
|
if isinstance(function_name_filter_list, str):
|
||||||
|
function_name_filter_list = function_name_filter_list.split(",")
|
||||||
|
|
||||||
for spec in specs:
|
for spec in specs:
|
||||||
function_name = spec["name"]
|
function_name = spec["name"]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue