Only display the destination in the bot started/stopped speaking log when there is a desintation

This commit is contained in:
Mark Backman
2025-05-02 17:23:41 -04:00
parent e6aadaccd8
commit 872204b795

View File

@@ -380,7 +380,9 @@ class BaseOutputTransport(FrameProcessor):
async def _bot_started_speaking(self):
if not self._bot_speaking:
logger.debug(f"Bot [{self._destination}] started speaking")
logger.debug(
f"Bot{f' [{self._destination}]' if self._destination else ''} started speaking"
)
downstream_frame = BotStartedSpeakingFrame()
downstream_frame.transport_destination = self._destination
@@ -393,7 +395,9 @@ class BaseOutputTransport(FrameProcessor):
async def _bot_stopped_speaking(self):
if self._bot_speaking:
logger.debug(f"Bot [{self._destination}] stopped speaking")
logger.debug(
f"Bot{f' [{self._destination}]' if self._destination else ''} stopped speaking"
)
downstream_frame = BotStoppedSpeakingFrame()
downstream_frame.transport_destination = self._destination