From a1d782d3ec1f732e4ed49b49f72850ca336f30b5 Mon Sep 17 00:00:00 2001 From: WcW <1754835+w121211@users.noreply.github.com> Date: Fri, 3 Jan 2025 01:46:01 +0900 Subject: [PATCH] Fix: Correct cancellation token usage in UserProxyAgent docstring (#4874) Co-authored-by: Jack Gerrits --- .../src/autogen_agentchat/agents/_user_proxy_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/packages/autogen-agentchat/src/autogen_agentchat/agents/_user_proxy_agent.py b/python/packages/autogen-agentchat/src/autogen_agentchat/agents/_user_proxy_agent.py index b3e15da85..2ad9a2468 100644 --- a/python/packages/autogen-agentchat/src/autogen_agentchat/agents/_user_proxy_agent.py +++ b/python/packages/autogen-agentchat/src/autogen_agentchat/agents/_user_proxy_agent.py @@ -98,7 +98,7 @@ class UserProxyAgent(BaseChatAgent): agent_task = asyncio.create_task( agent.on_messages( [TextMessage(content="What is your name? ", source="user")], - cancellation_token=CancellationToken(), + cancellation_token=token, ) ) response = await agent_task