Build a chatbot that answers weather questions using Latitude and a custom weather tool. Fun, fast, and just a bit magical.
You can play with this example in the Latitude Playground.
Curious if you need an umbrella before heading out? In this example, you’ll build a Weather Chatbot that fetches real-time weather information whenever users ask. Powered by Latitude prompts and your custom backend code, this bot delivers instant updates on sunshine, rain, or snow—with just a dash of magic.
The main concept to learn in this example is tool calling. This tool fetches weather data from the OpenWeatherMap API using the specified location. It returns the location name, temperature, and a description of the current weather conditions.
The key feature in this prompt is the use of a tool call. This allows the model to trigger a custom backend function to fetch weather data, such as by calling the OpenWeatherMap API. In the Latitude Playground, you can simulate this tool call, as shown in the screenshot above.