Hello, I am using qwen3-32B LLM using groq integr...
# agents
l
Hello, 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. It was working fine with Gemini model tool_call
Copy code
{
  "name": "end_call",
  "arguments": {}
}
/tool_call This is my end_call tool:
Copy code
@function_tool()
async def end_call(context: RunContext) -> dict:
    """
    Ends the call after user signals goodbye or task completion or
    the user is not interested in the conversation.
    """
    await context.session.generate_reply(
        instructions="Close the call politely based on the conversation history"  # noqa: E501
    )
    # Wait for any current speech to complete
    current = context.session.current_speech
    if current:
        await current.wait_for_playout()

    # Delete the LiveKit room to hang up for everyone
    job_ctx = get_job_context()

    # Stop active egress jobs
    request = ListEgressRequest(room_name=job_ctx.job.room.name, active=True)
    active = await job_ctx.api.egress.list_egress(request)
    for e in active.items:
        await job_ctx.api.egress.stop_egress(
            StopEgressRequest(egress_id=e.egress_id)
        )

    await job_ctx.api.room.delete_room(
        DeleteRoomRequest(room=job_ctx.room.name)
    )
    return {"ended": True}
b
Can you share how's your groq integration? Are you using livekit plugin or are you doing your own? If you are using livekit's plugin https://docs.livekit.io/agents/models/llm/plugins/groq/#parameters , try playing with
tool_choice
and set it to
required
instead of auto. That might help
Also to be 100% sure your qwen knows how to run tools, pass the raw_schema parameter to the @function_tool decorator so it matches Qwen's expectation of a function schema: https://qwen.readthedocs.io/en/latest/framework/function_call.html#the-example-case
l
Thank you for the prompt (no pun intended 😄) response @better-house-57730. Yes I am using groq plugin, will try your suggestions !
🤣 1