feat(examples/avatar): added animation triggers and trimmed personas#5899
feat(examples/avatar): added animation triggers and trimmed personas#5899brycedli wants to merge 1 commit into
Conversation
|
|
| async def opening_wave(self) -> None: | ||
| if OPENING_WAVE_DELAY_S > 0: | ||
| await asyncio.sleep(OPENING_WAVE_DELAY_S) | ||
| await self.play("wave") |
There was a problem hiding this comment.
π‘ Unhandled network exceptions from trigger_pose in opening_wave prevent agent greeting
The trigger_pose function (actions.py:50-63) makes an HTTP request via aiohttp but doesn't catch network-level exceptions (e.g., aiohttp.ClientError, asyncio.TimeoutError). While it handles non-OK HTTP responses by returning False, actual connection failures raise exceptions. The play() method (actions.py:107) also doesn't catch these, so exceptions propagate through opening_wave() to the caller.
In the entrypoint (agent.py:112), if opening_wave() raises, session.generate_reply() at agent.py:114 is never reached β the agent silently fails to greet the user. In the set_avatar RPC handler (agent.py:166), the same failure prevents both the greeting (agent.py:168) and the RPC response (agent.py:181). A transient network error during a cosmetic wave animation should not break the core conversation flow.
| async def opening_wave(self) -> None: | |
| if OPENING_WAVE_DELAY_S > 0: | |
| await asyncio.sleep(OPENING_WAVE_DELAY_S) | |
| await self.play("wave") | |
| async def opening_wave(self) -> None: | |
| if OPENING_WAVE_DELAY_S > 0: | |
| await asyncio.sleep(OPENING_WAVE_DELAY_S) | |
| try: | |
| await self.play("wave") | |
| except Exception: | |
| logger.warning("opening wave failed", exc_info=True) | |
Was this helpful? React with π or π to provide feedback.
Summary
actions.py)