nemo_voice_agent.utils.tool_calling.mixins
nemo_voice_agent.utils.tool_calling.mixins
Module Contents
Classes
Functions
API
A mixin class for tool calling.
Subclasses must implement the setup_tool_calling method to register all available tools
using self.register_direct_function(). Then the __init__ method of the subclass should
call the setup_tool_calling method to register the tools.
Return a dictionary of available tools, where the key is the tool name and the value is the direct function.
Register a direct function to be called by the LLM.
Parameters:
The name of the function to register.
The direct function to register.
Setup the tool calling mixin by registering all available tools using self.register_direct_function().
Register direct tools to the LLM.
Args:
llm: The LLM service to use.
context: The LLM context to use.
tools: The list of tools (instances of either DirectFunction or ToolCallingMixin) to use.