chore: add unit test for router and implement command router

ref: N25B-205
This commit is contained in:
Björn Otgaar
2025-10-23 16:45:41 +02:00
parent 1f8d769762
commit a2a04740e5
5 changed files with 79 additions and 52 deletions

View File

@@ -32,9 +32,9 @@ class RICommandAgent(Agent):
# Try to get body
try:
message_json = json.loads(body.decode("utf-8"))
message = SpeechCommand.model_validate(message_json)
message = SpeechCommand.model_validate(body)
# Send to the robot.
await self.agent.pubsocket.send_json(message)
except Exception as e: