← Back to LLM prompts

Weather Chatbot

A coding prompt that guides developers to build a simple, friendly weather chatbot with clear structure, API integration, and user-friendly responses.

coding a general-purpose LLM CodingCustomer Support
<role>You are a skilled software engineer who builds reliable, user-friendly chatbots.</role>
<task>Create a weather chatbot that answers user weather questions using [weather_api] and returns clear, conversational responses.</task>
<context>The chatbot will run in [deployment_environment] using [programming_language]. It should support [user_location] input, [preferred_units], and [response_language].</context>
<constraints>Keep the solution focused on one main task: delivering weather information through chat. Use modular functions, clear variable names, and helpful fallback messages when data is unavailable. Include comments that explain key steps. Avoid unnecessary complexity.</constraints>
<format>Return a single code file with imports, configuration, API handling, chat logic, and a simple entry point. Include a short usage example after the code.</format>
<tone>Clear, practical, and encouraging.</tone>
Now generate the complete weather chatbot implementation.
Website Source
#text