From 6b789a09354a1d6b43b389b6345f90fdf04e25b1 Mon Sep 17 00:00:00 2001 From: Abbas Asad <168946441+Abbas-Asad@users.noreply.github.com> Date: Fri, 15 Aug 2025 20:01:57 +0500 Subject: [PATCH] Docs: Add missing docstring to `get_weather` function (in `README.md`) ## Summary Added a missing docstring to the `get_weather` function (in `README.md`) in Functions example to improve code documentation and tool description. ## Problem The `get_weather` function in `README.md` was missing a proper docstring, which is important for: - Clear function documentation and readability - Helping language models understand the tool's purpose and when to use it - Following Python best practices for function documentation ## Changes Made Added a concise, one-line docstring to the `get_weather` function in `README.md`: ```python @function_tool def get_weather(city: str) -> str: """Get the current weather for a given city.""" return f"The weather in {city} is sunny." ``` --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 76c0d60d9..84a81d081 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ from agents import Agent, Runner, function_tool @function_tool def get_weather(city: str) -> str: + """Get the current weather for a given city.""" return f"The weather in {city} is sunny."