gm.tools.ToolHandlerBase#
- class gemma.gm.tools.ToolHandlerBase[source]
Bases:
etils.epy.contextlib.ContextManager,abc.ABCBase class to orchestrate tools.
- is_active: bool = False
- add_system_prompt(
- prompt: dialog._src.conversation.Conversation,
Returns the system prompt.
- maybe_execute_tool(
- model_output: str,
Parses the model output answer and call the associated tool if needed.
- property tools: list[mcp.types.Tool]
Returns the tools.
- call_tool(
- name: str,
- arguments: dict[str, Any],
Calls the tool.