rtvi: add on_bot_started event

This commit is contained in:
Aleix Conchillo Flaqué
2024-11-17 22:40:00 +01:00
parent a2a94724e5
commit 5445bb0363
2 changed files with 4 additions and 1 deletions

View File

@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Added RTVI `on_bot_started` event which is useful in single turn.
- Added `DailyTransport` events `dialin-connected`, `dialin-stopped`,
`dialin-error` and `dialin-warning`. Needs daily-python >= 0.13.0.

View File

@@ -591,6 +591,7 @@ class RTVIProcessor(FrameProcessor):
self._message_queue = asyncio.Queue()
self._message_task = self.get_event_loop().create_task(self._message_task_handler())
self._register_event_handler("on_bot_started")
self._register_event_handler("on_client_ready")
def register_action(self, action: RTVIAction):
@@ -679,7 +680,7 @@ class RTVIProcessor(FrameProcessor):
await self._pipeline.cleanup()
async def _start(self, frame: StartFrame):
pass
await self._call_event_handler("on_bot_started")
async def _stop(self, frame: EndFrame):
await self._cancel_tasks()