Made the get_weather_for_city function as a tool.
Browse filesAdded tool decorator to get_weather_for_city(city: str) -> str function.
Now onwards this function is aa tool.
app.py
CHANGED
|
@@ -18,6 +18,7 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
| 18 |
"""
|
| 19 |
return "What magic will you build ?"
|
| 20 |
|
|
|
|
| 21 |
def get_weather_for_city(city: str) -> str:
|
| 22 |
"""A tool that fetches the current weather for a specified city.
|
| 23 |
|
|
|
|
| 18 |
"""
|
| 19 |
return "What magic will you build ?"
|
| 20 |
|
| 21 |
+
@tool
|
| 22 |
def get_weather_for_city(city: str) -> str:
|
| 23 |
"""A tool that fetches the current weather for a specified city.
|
| 24 |
|