A programming framework for agentic AI
Fix incorrect type cast (#4620)
peterychang51d4a1077428
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.pyindex 35aa5fa88..3604b8250 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@@ -18,7 +18,7 @@ InputFuncType = Union[SyncInputFunc, AsyncInputFunc]# TODO: ainput doesn't seem to play nicely with jupyter.# No input window appears in this case.async def cancellable_input(prompt: str, cancellation_token: Optional[CancellationToken]) -> str:- task = asyncio.Task[str](asyncio.create_task(ainput(prompt))) # type: ignore+ task: asyncio.Task[str] = asyncio.create_task(ainput(prompt)) # type: ignoreif cancellation_token is not None:cancellation_token.link_future(task)return await task