Merge pull request #697 from pipecat-ai/cst/leave-message

add handler for disconnect-bot message
This commit is contained in:
Mark Backman
2024-11-18 09:38:11 -05:00
committed by GitHub
2 changed files with 9 additions and 0 deletions

View File

@@ -5,6 +5,13 @@ All notable changes to **Pipecat** will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
- Added a new RTVI message called `disconnect-bot`, which when handled pushes
an `EndFrame` to trigger the pipeline to stop.
## [0.0.49] - 2024-11-17
### Added

View File

@@ -743,6 +743,8 @@ class RTVIProcessor(FrameProcessor):
case "update-config":
update_config = RTVIUpdateConfig.model_validate(message.data)
await self._handle_update_config(message.id, update_config)
case "disconnect-bot":
await self.push_frame(EndFrame())
case "action":
action = RTVIActionRun.model_validate(message.data)
action_frame = RTVIActionFrame(message_id=message.id, rtvi_action_run=action)