mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-22 11:51:04 +02:00
chore: upgrade pipecat
This commit is contained in:
parent
7b77721964
commit
e34e4f8f3c
13 changed files with 45 additions and 58 deletions
|
|
@ -14,7 +14,6 @@ from pipecat.frames.frames import (
|
|||
from pipecat.metrics.metrics import (
|
||||
LLMTokenUsage,
|
||||
LLMUsageMetricsData,
|
||||
STTUsageMetricsData,
|
||||
TTSUsageMetricsData,
|
||||
)
|
||||
from pipecat.processors.frame_processor import FrameDirection, FrameProcessor
|
||||
|
|
@ -49,8 +48,6 @@ class PipelineMetricsAggregator(FrameProcessor):
|
|||
await self._handle_llm_usage_metrics(data)
|
||||
elif isinstance(data, TTSUsageMetricsData):
|
||||
await self._handle_tts_usage_metrics(data)
|
||||
elif isinstance(data, STTUsageMetricsData):
|
||||
await self._handle_stt_usage_metrics(data)
|
||||
|
||||
await self.push_frame(frame, direction)
|
||||
|
||||
|
|
@ -104,11 +101,6 @@ class PipelineMetricsAggregator(FrameProcessor):
|
|||
self._tts_usage_metrics[key] += data.value
|
||||
# logger.debug(f"TTS usage metrics: {self._tts_usage_metrics}")
|
||||
|
||||
async def _handle_stt_usage_metrics(self, data: STTUsageMetricsData):
|
||||
key = f"{data.processor}|||{data.model}"
|
||||
self._stt_usage_metrics[key] += data.value
|
||||
logger.debug(f"STT usage metrics: {self._stt_usage_metrics}")
|
||||
|
||||
def get_llm_usage_metrics(self) -> Dict[str, LLMTokenUsage]:
|
||||
"""Get the aggregated LLM usage metrics grouped by processor|||model."""
|
||||
return self._llm_usage_metrics
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@ from pipecat.turns.user_stop import (
|
|||
from pipecat.turns.user_turn_strategies import UserTurnStrategies
|
||||
from pipecat.utils.enums import EndTaskReason, RealtimeFeedbackType
|
||||
from pipecat.utils.run_context import set_current_run_id
|
||||
from pipecat.utils.tracing.context_registry import ContextProviderRegistry
|
||||
|
||||
# Setup tracing if enabled
|
||||
setup_tracing_exporter()
|
||||
|
|
@ -766,5 +765,4 @@ async def _run_pipeline(
|
|||
except asyncio.CancelledError:
|
||||
logger.warning("Received CancelledError in _run_pipeline")
|
||||
finally:
|
||||
ContextProviderRegistry.remove_providers(str(workflow_run_id))
|
||||
logger.debug(f"Cleaned up context providers for workflow run {workflow_run_id}")
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@ from api.services.telephony.providers.ari_call_strategies import (
|
|||
ARIBridgeSwapStrategy,
|
||||
ARIHangupStrategy,
|
||||
)
|
||||
from api.services.telephony.providers.cloudonix_call_strategies import CloudonixHangupStrategy
|
||||
from api.services.telephony.providers.cloudonix_call_strategies import (
|
||||
CloudonixHangupStrategy,
|
||||
)
|
||||
from api.services.telephony.providers.twilio_call_strategies import (
|
||||
TwilioConferenceStrategy,
|
||||
TwilioHangupStrategy,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue