I am using qwen3-32B LLM using groq integration, b...
# ask-ai
l
I am using qwen3-32B LLM using groq integration, but the tool calling is messed up and agent is speaking this out loud and getting this in transcript <tool_call> {"name": "end_call", "arguments": {}} </tool_call>
t
Thanks for reaching out, ROHIT. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm here to help you with the tool calling issue you're experiencing with the qwen3-32B LLM using Groq integration. Let's walk through some steps together: • Verify Template Configuration: Please check that your model is using a tool-aware Jinja template, like the Hermes 2 Pro format, as this is essential for the tool calling to work smoothly. • Control Parameters: Try setting
parallel_tool_calls=False
to debug things step-by-step. Also, adjust
tool_choice
to
'auto'
,
'required'
, or
'none'
depending on what fits your needs best. • Event Handling: Make sure the system is correctly emitting the function call and properly closing the generation after the tool call is made. If you’re still running into issues, double-check that your
GROQ_API_KEY
is set correctly and that your server is started with a tools-enabled template. Please feel free to reach out if you need any more help—I’m here for you! Sources: livekit-plugins/livekit-plugins-google/livekit/plugins/google/llm.py | Groq LLM plugin guide | LiveKit Docs | docs/function-calling.md
a
@alert-easter-19258 - can't we override the llm node or tts node such that it doesn't speak the tool call
t
Yes, you can override the
llm_node
or
tts_node
to prevent tool calls from being spoken. Here are your options: • Override `llm_node`: Intercept and filter out tool calls from the output stream before they are passed to the TTS system. This ensures tool calls are not included in the text sent for synthesis. • Override `tts_node`: Process the text just before it is synthesized into speech. For example, you can filter out or modify any content derived from tool calls. • Disable Tool Calls: Set the
tool_choice
parameter in
ModelSettings
to
'none'
to prevent the LLM from making tool calls entirely. Let me know if you need guidance on implementing any of these options! Sources: xAI LLM plugin guide | LiveKit Docs | Together AI LLM plugin guide | LiveKit Docs | Perplexity LLM plugin guide | LiveKit Docs | DeepSeek LLM plugin guide | LiveKit Docs | Pipeline nodes and hooks | LiveKit docs
a
give me an example of overriding llm or tts node; i.e. the agent makes a tool call and speaks but overriding the llm node such that it doesn't speak the tool call
t
Here is an example of overriding the
llm_node
to prevent tool calls from being spoken:
Copy code
class SilentToolAgent(Agent):
    """An agent that prevents tool calls from being spoken aloud."""

    async def llm_node(self, chat_ctx, tools, model_settings):
        """Override LLM node to exclude tool calls from TTS output."""
        async for chunk in super().llm_node(chat_ctx, tools, model_settings):
            # Only yield text content; skip any tool calls
            if isinstance(chunk, ChatChunk) and chunk.delta and chunk.delta.content:
                yield chunk
            elif isinstance(chunk, str):  # Handle plain string responses
                yield chunk
            # Any chunk with tool_calls is silently excluded from TTS
This ensures that tool calls are processed internally but not passed to the TTS system for speech synthesis. Let me know if you need further assistance or additional examples! Sources: LiveKit Docs | agent.py | Pipeline nodes and hooks | LiveKit docs