From 4a4a0439eea482babb7507adb72e43e9a9ee66be Mon Sep 17 00:00:00 2001 From: Suhaib Umair <154515857+MuhammedSuhaib@users.noreply.github.com> Date: Sat, 23 Aug 2025 20:13:42 +0500 Subject: [PATCH] docs: clarify ToolsToFinalOutputResult docstrings --- git | 0 src/agents/agent.py | 9 +++++---- 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 git diff --git a/git b/git new file mode 100644 index 000000000..e69de29bb diff --git a/src/agents/agent.py b/src/agents/agent.py index b64a6ea1d..d061a5cc2 100644 --- a/src/agents/agent.py +++ b/src/agents/agent.py @@ -38,13 +38,14 @@ @dataclass class ToolsToFinalOutputResult: is_final_output: bool - """Whether this is the final output. If False, the LLM will run again and receive the tool call - output. + """If True, this is the final output; + if False, LLM will run again and receive the tool call output. """ final_output: Any | None = None - """The final output. Can be None if `is_final_output` is False, otherwise must match the - `output_type` of the agent. + """The final output value. + - Must be non-None and match the agent's `output_type` if `is_final_output` is True. + - Must be None if `is_final_output` is False. """