Overview
This application uses a tool generation node to request current temperature from an external weather API. Include the latitude and longitude of the location in your message, for example: “What is the current temperature at latitude 40.71, longitude -74.01?” The system prompt instructs the assistant to ask for both coordinates if either is missing. The workflow uses the supplied location for the weather request.YAML Workflow
Workflow Breakdown

- Create a System Message: A message is created with the role of “system.” This message frames the context for the tool generation, telling the virtual assistant what its role is in this workflow. It instructs the assistant to use the supplied coordinates, ask for missing coordinates, and report the current temperature.
- User Message Handling:
- Receive User Input: Capture a message from the user, which typically contains the user’s query or request.
- Create User Message: This step converts the captured input into a message object with the role of “user”.
- Combine Messages: The system message and user message are combined into a list, which will be used to provide context for operations performed in subsequent steps.
- Tool Generation & Execution:
- Get Coordinates: Read the latitude and longitude from the user’s message, or ask the user to supply them.
- Get Weather: The HTTP request tool passes those coordinates using the
query_schemato Open-Meteo. Thecurrent=temperature_2mparameter requests current temperature rather than an hourly forecast.