mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
parent
9cc051ded4
commit
d33ae01d5a
|
|
@ -4,7 +4,6 @@ import json
|
|||
from typing import List
|
||||
|
||||
from langchain_mcp_adapters.client import MultiServerMCPClient
|
||||
from langchain_mcp_adapters.sessions import create_session
|
||||
|
||||
from application.flow.i_step_node import NodeResult
|
||||
from application.flow.step_node.mcp_node.i_mcp_node import IMcpNode
|
||||
|
|
@ -25,7 +24,7 @@ class BaseMcpNode(IMcpNode):
|
|||
|
||||
async def call_tool(t, a):
|
||||
client = MultiServerMCPClient(servers)
|
||||
async with create_session(client.connections[mcp_server]) as s:
|
||||
async with client.session(mcp_server) as s:
|
||||
return await s.call_tool(t, a)
|
||||
|
||||
res = asyncio.run(call_tool(mcp_tool, params))
|
||||
|
|
|
|||
Loading…
Reference in New Issue