MCPcopy Index your code
hub / github.com/microsoft/autogen / my_function1

Function my_function1

python/packages/autogen-core/tests/test_tools.py:98–99  ·  view source on GitHub ↗
(arg: str, other: Annotated[int, "int arg"], nonrequired: int = 5)

Source from the content-addressed store, hash-verified

96
97def test_func_tool_schema_generation_strict() -> None:
98 def my_function1(arg: str, other: Annotated[int, "int arg"], nonrequired: int = 5) -> MyResult:
99 return MyResult(result="test")
100
101 with pytest.raises(ValueError, match="Strict mode is enabled"):
102 tool = FunctionTool(my_function1, description="Function tool.", strict=True)

Callers

nothing calls this directly

Calls 1

MyResultClass · 0.70

Tested by

no test coverage detected