loud-raincoat-52525
11/12/2025, 3:07 PMllm_node function in STT->LLM->TTS pipeline? I tried settings attributes on the llm_node span but that does not enable langfuse to link traces to specific prompts in the UI. I believe the prompt name and prompt version attributes need to the set on the llm_request generation (defined at https://github.com/livekit/livekit_composite/blob/cd1a2500/livekit/agents/livekit-agents/livekit/agents/llm/llm.py), is there a nice way of doing this? Thoughts?colossal-airport-32984
11/12/2025, 6:59 PMlangfuse_resource is the prompt loaded via LangFuse SDK
with self._client.start_as_current_span(name=f"{langfuse_resource.name}") as span:
span.update_trace(session_id=self._tracing_metadata.langfuse_session_id)
name = (
f"Prompt Used in Conversation Session ID: "
f"{self._tracing_metadata.conversation_session_id}"
)
with self._client.start_as_current_observation(name=name, as_type="generation") as obs:
obs.update(prompt=langfuse_resource)
If anyone is aware of a better way I am interested too