Rename fields in agent metadata (#336)

* Rename fields in agent metadata

* team one fixes

* another fix
This commit is contained in:
Jack Gerrits
2024-08-07 16:08:13 -04:00
committed by GitHub
parent 437dbefc32
commit 39489ba395
32 changed files with 94 additions and 95 deletions

View File

@@ -23,7 +23,7 @@ class UserProxyAgent(TypeRoutedAgent):
async def on_publish_now(self, message: PublishNow, cancellation_token: CancellationToken) -> None:
"""Handle a publish now message. This method prompts the user for input, then publishes it."""
user_input = await self.get_user_input(self._user_input_prompt)
await self.publish_message(TextMessage(content=user_input, source=self.metadata["name"]))
await self.publish_message(TextMessage(content=user_input, source=self.metadata["type"]))
async def get_user_input(self, prompt: str) -> str:
"""Get user input from the console. Override this method to customize how user input is retrieved."""