diff --git a/python/packages/autogen-core/docs/src/user-guide/agentchat-user-guide/tutorial/agents.ipynb b/python/packages/autogen-core/docs/src/user-guide/agentchat-user-guide/tutorial/agents.ipynb index 43b0212c8ed7..592b8535c84a 100644 --- a/python/packages/autogen-core/docs/src/user-guide/agentchat-user-guide/tutorial/agents.ipynb +++ b/python/packages/autogen-core/docs/src/user-guide/agentchat-user-guide/tutorial/agents.ipynb @@ -394,15 +394,6 @@ ], "source": [ "import asyncio\n", - "from typing import List, Sequence\n", - "\n", - "from autogen_agentchat.agents import BaseChatAgent\n", - "from autogen_agentchat.base import Response\n", - "from autogen_agentchat.messages import (\n", - " ChatMessage,\n", - " StopMessage,\n", - ")\n", - "from autogen_core.base import CancellationToken\n", "\n", "\n", "class UserProxyAgent(BaseChatAgent):\n", @@ -411,12 +402,10 @@ "\n", " @property\n", " def produced_message_types(self) -> List[type[ChatMessage]]:\n", - " return [TextMessage, StopMessage]\n", + " return [TextMessage]\n", "\n", " async def on_messages(self, messages: Sequence[ChatMessage], cancellation_token: CancellationToken) -> Response:\n", " user_input = await asyncio.get_event_loop().run_in_executor(None, input, \"Enter your response: \")\n", - " if \"TERMINATE\" in user_input:\n", - " return Response(chat_message=StopMessage(content=\"User has terminated the conversation.\", source=self.name))\n", " return Response(chat_message=TextMessage(content=user_input, source=self.name))\n", "\n", " async def reset(self, cancellation_token: CancellationToken) -> None:\n",