Skip to content

Commit 0e29ce2

Browse files
committed
chore: remove unused MCP response function from base_chat_node.py
1 parent eed4d68 commit 0e29ce2

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

apps/application/flow/step_node/ai_chat_step_node/impl/base_chat_node.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,6 @@ def mcp_response_generator(chat_model, message_list, mcp_servers):
119119
async def anext_async(agen):
120120
return await agen.__anext__()
121121

122-
async def _get_mcp_response(chat_model, message_list, mcp_servers):
123-
async with MultiServerMCPClient(json.loads(mcp_servers)) as client:
124-
agent = create_react_agent(chat_model, client.get_tools())
125-
response = agent.astream({"messages": message_list}, stream_mode='messages')
126-
result = []
127-
async for chunk in response:
128-
# if isinstance(chunk[0], ToolMessage):
129-
# print(chunk[0].content)
130-
if isinstance(chunk[0], AIMessageChunk):
131-
result.append(chunk[0])
132-
return result
133122

134123
def write_context(node_variable: Dict, workflow_variable: Dict, node: INode, workflow):
135124
"""

0 commit comments

Comments
 (0)