(self, tool_task_state: ToolTaskState)
| 188 | _input_type = int |
| 189 | |
| 190 | def __call__(self, tool_task_state: ToolTaskState) -> ToolResult: |
| 191 | n = tool_task_state.messages[-1].content |
| 192 | n = try_cast_from_str(n, int) |
| 193 | if n is None: |
| 194 | return None |
| 195 | |
| 196 | n = sum(i for i in range(1, n + 1) if str(i) == str(i)[::-1]) |
| 197 | return ToolResult(n) |
| 198 | |
| 199 | |
| 200 | class MaxPrimeFactor(Tool): |
nothing calls this directly
no test coverage detected