def llm_wrapper(metrics: LLMMetrics): asyncio.cr...
# agents
a
# def llm_wrapper(metrics: LLMMetrics): # asyncio.create_task(on_llm_metrics(metrics)) # # async def on_llm_metrics(metrics: LLMMetrics): # logger.info(f"Received metrics llm: {metrics}") # # session.llm.on("metrics_collected", llm_wrapper) # # def tts_wrapper(metrics: TTSMetrics): # asyncio.create_task(on_tts_metrics(metrics)) # # async def on_tts_metrics(metrics: TTSMetrics): # logger.info(f"Received metrics tts: {metrics}") # # session.tts.on("metrics_collected", tts_wrapper) # def stt_wrapper(metrics: STTMetrics): # asyncio.create_task(on_stt_metrics(metrics)) # # async def on_stt_metrics(metrics: STTMetrics): # logger.info(f"Received metrics stt: {metrics}") I can use per plugin instance to subscribe over the metrics_collected event, as sessiion level metrics collected event is deprecated. but how will I track eou? there is no plugin instance to track eou
t
Hi Harshita Sukumar Patil, ⚠️ This channel will be deleted soon ⚠️ Please use our new community at https://community.livekit.io for technical discussions and to post technical questions. The Slack community is not going away, but we are migrating technical questions to our new forum. Please see full details here.
p
You’re right that moving metrics to the plugin level makes sense since session-level metrics are deprecated. For EOU, you won’t find it on a plugin instance because it isn’t really a plugin concern—it’s a turn-taking signal. The usual way is to infer it from the STT stream ending or final transcript event, or from the VAD/speech boundary signals in the session layer, depending on what your stack exposes. So instead of tracking EOU directly, you treat it as a session-level transition derived from those speech end indicators. @adorable-bear-14321