From 5be6422cc89c7fba58ec818a1495454f8ce359a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Thu, 15 Aug 2024 11:51:00 -0700 Subject: [PATCH] Revert "processors(rtvi): process options in the order they are defined" This reverts commit 61ac83e2d9f77c0c602819b200b85d126f139b60. --- src/pipecat/processors/frameworks/rtvi.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/pipecat/processors/frameworks/rtvi.py b/src/pipecat/processors/frameworks/rtvi.py index a7df93aef..267a992cd 100644 --- a/src/pipecat/processors/frameworks/rtvi.py +++ b/src/pipecat/processors/frameworks/rtvi.py @@ -521,14 +521,10 @@ class RTVIProcessor(FrameProcessor): async def _update_service_config(self, config: RTVIServiceConfig): service = self._registered_services[config.service] - # Process options in the order they are defined, not in the order they - # are sent. - for option_def in service.options: - for option in config.options: - if option_def.name == option.name: - handler = option_def.handler - await handler(self, service.name, option) - self._update_config_option(service.name, option) + for option in config.options: + handler = service._options_dict[option.name].handler + await handler(self, service.name, option) + self._update_config_option(service.name, option) async def _update_config(self, data: RTVIConfig): for service_config in data.config: