Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzhu committed Nov 10, 2024
1 parent 42333e5 commit 6cc6dc0
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 6cc6dc0

Please sign in to comment.