You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return`Weather forecast in ${inputs.locationName} is ${forecastData.properties.periods[0].detailedForecast}`;
57
-
} catch (error) {
58
-
console.error('Error:', error);
59
-
throw error;
60
-
}
48
+
// Implement fetching data from weather.gov.
61
49
}
62
50
)
63
51
64
-
// 2. Create a Weather Agent
52
+
// 2. Build the agent
65
53
constWeatherAgent=newAgent(
66
54
'WeatherAgent',
67
55
{
68
56
persona:'You are a cheerful and approachable virtual assistant dedicated to delivering accurate, concise, and engaging weather updates. Your tone is warm, lively, and always focused on making weather information easy to understand and fun to receive.',
69
57
goal:'Provide the current weather for a specified location as soon as the city or location details are provided. Your response should be both informative and conversational, ensuring clarity and usefulness for the user.',
0 commit comments