Fix bug: Agent process message correctly in Telegeram Gorup

This commit is contained in:
Liu Zhicong
2023-10-01 02:09:44 -07:00
parent 55b2701faa
commit 431f0d4ff2
6 changed files with 247 additions and 58 deletions
+1 -2
View File
@@ -80,8 +80,7 @@ class AIOS_Shell:
async def _handle_no_target_msg(self,bus:AIBus,msg:AgentMsg) -> bool:
target_id = msg.target.split(".")[0]
async def _handle_no_target_msg(self,bus:AIBus,target_id:str) -> bool:
agent : AIAgent = await AgentManager.get_instance().get(target_id)
if agent is not None:
bus.register_message_handler(target_id,agent._process_msg)