MCPcopy
hub / github.com/openai/evals / __call__

Method __call__

evals/elsuite/bugged_tools/tools.py:190–197  ·  view source on GitHub ↗
(self, tool_task_state: ToolTaskState)

Source from the content-addressed store, hash-verified

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
200class MaxPrimeFactor(Tool):

Callers

nothing calls this directly

Calls 2

try_cast_from_strFunction · 0.90
ToolResultClass · 0.85

Tested by

no test coverage detected