We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af0a5e6 commit f5f3a94Copy full SHA for f5f3a94
samples-v2/openai_agents/function_app.py
@@ -138,11 +138,12 @@ class Weather:
138
conditions: str
139
140
@app.activity_trigger(input_name="city")
141
-async def get_weather(city: str) -> Weather:
+async def get_weather(city: str) -> str:
142
"""
143
Get the weather for a given city.
144
145
- return Weather(city=city, temperature_range="14-20C", conditions="Sunny with wind.")
+ weather = Weather(city=city, temperature_range="14-20C", conditions="Sunny with wind.")
146
+ return f"Weather in {weather.city}: {weather.temperature_range}, {weather.conditions}"
147
148
149
#region Implementation details
0 commit comments