Is it possible to show ai reasoning text on the ch...
# ask-ai
a
Is it possible to show ai reasoning text on the chat, without the voice and Voice agent will only tell the result
t
Thanks for reaching out, Synthesize. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Absolutely, you can show the AI’s reasoning text in the chat while having the voice agent share just the final answer. It’s all about tweaking the LLM output before it goes to the Text-to-Speech (TTS) engine. Here’s a simple way to think about it: 1. Set up a callback function that processes the LLM’s output. This function will split the response into two parts: the detailed reasoning for the chat and the short, clear final result for the voice. 2. Update the chat so users can see the full reasoning text—it’s great for transparency and understanding! 3. Send only the final result to the TTS engine so the voice agent delivers a concise answer. For instance, a function like
modify_llm_output_before_tts
can help manage this, and you can plug it right into your voice agent setup. If you want, I’m happy to share more details or some code snippets to get you started!
a
If I have a multiagent on tool call. Can I stream it's log to frontend
t
Absolutely, you can stream multi-agent tool call logs right to the frontend! It’s pretty straightforward using LiveKit's RPC (Remote Procedure Call) feature. Here’s the scoop: 1. Whenever tool calls happen, the system sends out a
function_tools_executed
event that includes the function calls and their results. 2. You can then pass these tool execution events over to the frontend using LiveKit’s RPC methods. 3. On the frontend side, just set up RPC methods to catch and handle this tool execution data. For instance, you might use
room.local_participant.perform_rpc()
to send the tool execution info to the frontend, where you can easily process and show it. If you want, I’m happy to share more details or examples—just let me know! Sources: LiveKit Docs | livekit-agents/livekit/agents/voice/agent_activity.py | Function calling with Voice Agents | LiveKit Docs