From 6cc6dc0e27b3d3553934c49f9ef239d6178ca569 Mon Sep 17 00:00:00 2001 From: Eric Zhu Date: Sat, 9 Nov 2024 17:51:45 -0800 Subject: [PATCH] lint --- .../agentchat-user-guide/tutorial/agents.ipynb | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) 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",