Runs the tool with the given arguments and context. NOTE: - Required if this tool needs to run at the client side. - Otherwise, can be skipped, e.g. for a built-in GoogleSearch tool for Gemini. Args: args: The LLM-filled arguments. tool_context: The context
(
self, *, args: dict[str, Any], tool_context: ToolContext
)
| 120 | return None |
| 121 | |
| 122 | async def run_async( |
| 123 | self, *, args: dict[str, Any], tool_context: ToolContext |
| 124 | ) -> Any: |
| 125 | """Runs the tool with the given arguments and context. |
| 126 | |
| 127 | NOTE: |
| 128 | - Required if this tool needs to run at the client side. |
| 129 | - Otherwise, can be skipped, e.g. for a built-in GoogleSearch tool for |
| 130 | Gemini. |
| 131 | |
| 132 | Args: |
| 133 | args: The LLM-filled arguments. |
| 134 | tool_context: The context of the tool. |
| 135 | |
| 136 | Returns: |
| 137 | The result of running the tool. |
| 138 | """ |
| 139 | raise NotImplementedError(f"{type(self)} is not implemented") |
| 140 | |
| 141 | async def process_llm_request( |
| 142 | self, *, tool_context: ToolContext, llm_request: LlmRequest |
no test coverage detected