From 8d18be5069dc1c25d323dcd8f0773d6afdf3cbde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Thu, 6 Jun 2024 15:40:23 -0700 Subject: [PATCH] services(anthropic): fix metrics --- src/pipecat/services/anthropic.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pipecat/services/anthropic.py b/src/pipecat/services/anthropic.py index 95b31f336..51e1c60f1 100644 --- a/src/pipecat/services/anthropic.py +++ b/src/pipecat/services/anthropic.py @@ -101,7 +101,7 @@ class AnthropicLLMService(LLMService): messages = self._get_messages_from_openai_context(context) - await self.start_ttfb_metric() + await self.start_ttfb_metrics() response = await self._client.messages.create( messages=messages, @@ -109,7 +109,7 @@ class AnthropicLLMService(LLMService): max_tokens=self._max_tokens, stream=True) - await self.stop_ttfb_metric() + await self.stop_ttfb_metrics() async for event in response: # logger.debug(f"Anthropic LLM event: {event}") @@ -119,7 +119,7 @@ class AnthropicLLMService(LLMService): await self.push_frame(LLMResponseEndFrame()) except Exception as e: - logger.error(f"Anthrophic exception: {e}") + logger.error(f"Anthropic exception: {e}") finally: await self.push_frame(LLMFullResponseEndFrame())