refac
This commit is contained in:
1 parent
c5b73d7184
commit
477097c2e4
2 files changed
+12
-10
No files matched your search
@@ -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"]
|
||||||
|
|||||||
Reference in new issue
Block a user