Commit 770adbc
authored
Docs: Add missing docstring to get_weather function
## Summary
Added a missing docstring to the `get_weather` function in the tools example to improve code documentation and tool description.
## Problem
The `get_weather` function (tool) was missing a docstring, which is important for:
- Function documentation and code clarity
- Tool description that the LLM uses to understand when to call the tool
- Following Python best practices for function documentation
## Changes Made
Just added a clear and concise docstring to the `get_weather` function:
```python
@function_tool
def get_weather(city: str) -> Weather:
"""Get the current weather information for a specified city."""
print("[debug] get_weather called")
return Weather(city=city, temperature_range="14-20C", conditions="Sunny with wind.")
```
This docstring provides a clear description of the function's purpose and helps both developers and LLMs understand when and how to use this tool.1 parent c436389 commit 770adbc
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
0 commit comments