diff --git a/src/pipecat/transports/services/daily.py b/src/pipecat/transports/services/daily.py index 09258bf4c..eb2d6da7a 100644 --- a/src/pipecat/transports/services/daily.py +++ b/src/pipecat/transports/services/daily.py @@ -740,11 +740,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"] = [] @@ -752,7 +752,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",