MCPcopy
hub / github.com/openai/openai-agents-python / get_function_tool

Function get_function_tool

tests/test_responses.py:50–60  ·  view source on GitHub ↗
(
    name: str | None = None, return_value: str | None = None, hide_errors: bool = False
)

Source from the content-addressed store, hash-verified

48
49
50def get_function_tool(
51 name: str | None = None, return_value: str | None = None, hide_errors: bool = False
52) -> FunctionTool:
53 def _foo() -> str:
54 return return_value or "result_ok"
55
56 return function_tool(
57 _foo,
58 name_override=name,
59 failure_error_function=None if hide_errors else default_tool_error_function,
60 )
61
62
63def get_function_tool_call(

Calls 1

function_toolFunction · 0.90

Tested by

no test coverage detected