From 10a69cccefd020856345da579baa6ff58d8114ad Mon Sep 17 00:00:00 2001 From: Anton Dubovik Date: Tue, 14 Jan 2025 15:22:48 +0000 Subject: [PATCH] fix: minor fix --- aidial_analytics_realtime/dial.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/aidial_analytics_realtime/dial.py b/aidial_analytics_realtime/dial.py index bf2758b..2235d7a 100644 --- a/aidial_analytics_realtime/dial.py +++ b/aidial_analytics_realtime/dial.py @@ -67,6 +67,5 @@ def _chat_completion_message_contents( def _non_empty_string(value: str) -> Iterator[str]: - value = value.strip() - if value: - yield value + if non_empty := value.strip(): + yield non_empty