From 78a3f081de561097346e72bed2e7313597bbf2a3 Mon Sep 17 00:00:00 2001 From: Kwindla Hultman Kramer Date: Fri, 20 Sep 2024 18:21:06 -0700 Subject: [PATCH] fixup for serialization issue --- src/pipecat/transports/services/daily.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pipecat/transports/services/daily.py b/src/pipecat/transports/services/daily.py index e28fe6083..66d3b21d2 100644 --- a/src/pipecat/transports/services/daily.py +++ b/src/pipecat/transports/services/daily.py @@ -736,11 +736,11 @@ async def send_metrics(self, frame: MetricsFrame): if isinstance(d, TTFBMetricsData): if "ttfb" not in metrics: metrics["ttfb"] = [] - metrics["ttfb"].append(d.model_dump()) + metrics["ttfb"].append(d.model_dump(exclude_none=True)) elif isinstance(d, ProcessingMetricsData): if "processing" not in metrics: metrics["processing"] = [] - metrics["processing"].append(d.model_dump()) + metrics["processing"].append(d.model_dump(exclude_none=True)) elif isinstance(d, LLMUsageMetricsData): if "tokens" not in metrics: metrics["tokens"] = [] @@ -748,7 +748,7 @@ async def send_metrics(self, frame: MetricsFrame): elif isinstance(d, TTSUsageMetricsData): if "characters" not in metrics: metrics["characters"] = [] - metrics["characters"].append(d.model_dump()) + metrics["characters"].append(d.model_dump(exclude_none=True)) message = DailyTransportMessageFrame(message={ "type": "pipecat-metrics",