many-fall-81099
06/24/2025, 6:53 PMtall-airline-16756
06/24/2025, 6:53 PMtall-airline-16756
06/24/2025, 6:53 PMmany-fall-81099
06/24/2025, 6:53 PMtall-airline-16756
06/24/2025, 6:54 PMtool_choice
parameter in the ModelSettings
class, which lets you tell the system exactly which tools you want to shine.
Here's a friendly example of how you can set this up:
@dataclass
class ModelSettings:
tool_choice: NotGivenOr[llm.ToolChoice] = NOT_GIVEN
"""The tool choice to use when calling the LLM."""
And guess what? The Agent
class is also super flexible. When you're setting up your agent, you can define tool preferences right in the initialization parameters:
def __init__(
self,
*,
instructions: str,
chat_ctx: NotGivenOr[llm.ChatContext | None] = NOT_GIVEN,
tools: list[llm.FunctionTool | llm.RawFunctionTool] | None = None,
# other parameters...
) -> None:
By tweaking these settings, you'll have your agents working exactly the way you want. Sounds cool, right? If you need any help putting this into practice, I'm totally here for you – just give me a shout!
Sources: GitHub::LiveKit Agents | livekit-agents/livekit/agents/voice/agent.py | GitHub:: LiveKit Composite Repo | livekit/agents/livekit-agents/livekit/age...many-fall-81099
06/24/2025, 6:55 PMtall-airline-16756
06/24/2025, 6:55 PMmany-fall-81099
06/24/2025, 6:56 PMtool_choice
parameter in the ModelSettings
class, which lets you tell the system exactly which tools you want to shine.
Here's a friendly example of how you can set this up:
@dataclass
class ModelSettings:
tool_choice: NotGivenOr[llm.ToolChoice] = NOT_GIVEN
"""The tool choice to use when calling the LLM."""
And guess what? The Agent
class is also super flexible. When you're setting up your agent, you can define tool preferences right in the initialization parameters:
def __init__(
self,
*,
instructions: str,
chat_ctx: NotGivenOr[llm.ChatContext | None] = NOT_GIVEN,
tools: list[llm.FunctionTool | llm.RawFunctionTool] | None = None,
# other parameters...
) -> None:
By tweaking these settings, you'll have your agents working exactly the way you want. Sounds cool, right? If you need any help putting this into practice, I'm totally here for you – just give me a shout!
Use this as contextmany-fall-81099
06/24/2025, 7:02 PM