Any way to see thinking traces?
# ask-ai
r
Any way to see thinking traces?
t
Thanks for reaching out, Trevor. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Could you clarify what you mean by 'thinking traces'? Are you referring to logs, debugging information, or something else? Any additional details would help us assist you better.
r
The tokens used when LLM is thinking
t
Hey there! Let me break down how different AI systems handle those behind-the-scenes "thinking tokens" in a way that's super easy to understand: • With OpenAI, they've got a nifty little function that basically strips out those thinking tokens before sending you the final chat response. Clean and simple! • Anthropic takes a slightly different approach - they specifically look for tokens between
<thinking>
and
</thinking>
tags and just quietly ignore them. Pretty smart, right? Curious about how this might work for your specific project? I'm all ears! Feel free to share more details, and we can chat through it together. Sources: GitHub::livekit::agents | livekit-agents/livekit/agents/llm/llm.py
r
I want to see them and log them if possbile
t
Hey there! I totally understand you're looking for some clarity. Could you tell me a bit more about what you're trying to do? I want to make sure I fully get your goal - are you wanting to track those thinking tokens while the AI is working its magic, maybe for troubleshooting? Or are you hoping to gather them in a special way for some deeper analysis? Also, I'm curious - are you working with a specific AI framework or plugin, like OpenAI or Anthropic? The more details you can share, the better I can help you figure this out. I'm all ears! 😊 Sources: Modifying LLM output before TTS | LiveKit Docs | GitHub::livekit::agents | livekit-plugins/livekit-plugins-openai/livekit/pl...
r
I want to see the chain of thought if one exists
t
Hey there! Want to peek behind the curtain of how LLMs work their magic? Let me walk you through the Chain of Thought agent - it's pretty cool! 😊 • The LLM creates its reasoning inside
<think>...</think>
tags, like showing its mental work. • The
llm_node
method catches these output tags and does some neat processing. • For instance, it can remove
<think>
tags and replace them with something like an "Okay, I'm ready to respond" message. • This means you get to see the behind-the-scenes thinking while keeping the final response super clean! Wanna set this up? You can create a Chain of Thought agent that customizes the llm_node method to handle the LLM output just how you want. Need a hand getting started? I'm totally here to help! 🌟 Sources: Modifying LLM output before TTS | LiveKit Docs