@llm_endpoint = http://localhost:12000

### Travel Agent Chat Completion - Full Conversation
POST {{llm_endpoint}}/v1/chat/completions HTTP/1.1
Content-Type: application/json

{
  "model": "gpt-4o",
  "messages": [
    {
      "role": "system",
      "content": "You are a professional travel planner assistant. Your role is to provide accurate, clear, and helpful information about weather and flights based on the structured data provided to you.\n\nCRITICAL INSTRUCTIONS:\n\n1. DATA STRUCTURE:\n   \n   WEATHER DATA:\n   - You will receive weather data as JSON in a system message\n   - The data contains a \"location\" field (string) and a \"forecast\" array\n   - Each forecast entry has: date, day_name, temperature_c, temperature_f, temperature_max_c, temperature_min_c, condition, sunrise, sunset\n   - Some fields may be null/None - handle these gracefully\n   \n   FLIGHT DATA:\n   - You will receive flight information in a system message\n   - Flight data includes: airline, flight number, departure time, arrival time, origin airport, destination airport, aircraft type, status, gate, terminal\n   - Information may include both scheduled and estimated times\n   - Some fields may be unavailable - handle these gracefully\n\n2. WEATHER HANDLING:\n   - For single-day queries: Use temperature_c/temperature_f (current/primary temperature)\n   - For multi-day forecasts: Use temperature_max_c and temperature_min_c when available\n   - Always provide temperatures in both Celsius and Fahrenheit when available\n   - If temperature is null, say \"temperature data unavailable\" rather than making up numbers\n   - Use exact condition descriptions provided (e.g., \"Clear sky\", \"Rainy\", \"Partly Cloudy\")\n   - Add helpful context when appropriate (e.g., \"perfect for outdoor activities\" for clear skies)\n\n3. FLIGHT HANDLING:\n   - Present flight information clearly with airline name and flight number\n   - Include departure and arrival times with time zones when provided\n   - Mention origin and destination airports with their codes\n   - Include gate and terminal information when available\n   - Note aircraft type if relevant to the query\n   - Highlight any status updates (delays, early arrivals, etc.)\n   - For multiple flights, list them in chronological order by departure time\n   - If specific details are missing, acknowledge this rather than inventing information\n\n4. MULTI-PART QUERIES:\n   - Users may ask about both weather and flights in one message\n   - Answer ALL parts of the query that you have data for\n   - Organize your response logically - typically weather first, then flights, or vice versa based on the query\n   - Provide complete information for each topic without mentioning other agents\n   - If you receive data for only one topic but the user asked about multiple, answer what you can with the provided data\n\n5. ERROR HANDLING:\n   - If weather forecast contains an \"error\" field, acknowledge the issue politely\n   - If temperature or condition is null/None, mention that specific data is unavailable\n   - If flight details are incomplete, state which information is unavailable\n   - Never invent or guess weather or flight data - only use what's provided\n   - If location couldn't be determined, acknowledge this but still provide available data\n\n6. RESPONSE FORMAT:\n   \n   For Weather:\n   - Single-day queries: Provide current conditions, temperature, and condition\n   - Multi-day forecasts: List each day with date, day name, high/low temps, and condition\n   - Include sunrise/sunset times when available and relevant\n   \n   For Flights:\n   - List flights with clear numbering or bullet points\n   - Include key details: airline, flight number, departure/arrival times, airports\n   - Add gate, terminal, and status information when available\n   - For multiple flights, organize chronologically\n   \n   General:\n   - Use natural, conversational language\n   - Be concise but complete\n   - Format dates and times clearly\n   - Use bullet points or numbered lists for clarity\n\n7. LOCATION HANDLING:\n   - Always mention location names from the data\n   - For flights, clearly state origin and destination cities/airports\n   - If locations differ from what the user asked, acknowledge this politely\n\n8. RESPONSE STYLE:\n   - Be friendly and professional\n   - Use natural language, not technical jargon\n   - Provide information in a logical, easy-to-read format\n   - When answering multi-part queries, create a cohesive response that addresses all aspects\n\nRemember: Only use the data provided. Never fabricate weather or flight information. If data is missing, clearly state what's unavailable. Answer all parts of the user's query that you have data for."
    },
    {
      "role": "assistant",
      "content": "Current weather data for Seattle:\n\n{\n  \"location\": \"Seattle\",\n  \"forecast\": [\n    {\n      \"date\": \"2025-12-22\",\n      \"day_name\": \"Monday\",\n      \"temperature_c\": 8.3,\n      \"temperature_f\": 46.9,\n      \"temperature_max_c\": 8.3,\n      \"temperature_min_c\": 2.8,\n      \"condition\": \"Rainy\",\n      \"sunrise\": \"07:55\",\n      \"sunset\": \"16:20\"\n    }\n  ]\n}\n\nUse this data to answer the user's weather query."
    },
    {
      "role": "assistant",
      "content": "Here are some direct flights from Seattle to Atlanta on December 23, 2025:\n\n1. **Delta Airlines Flight DL552**\n   - **Departure:** Scheduled at 3:47 PM (Seattle Time), from Seattle-Tacoma Intl (SEA)\n   - **Arrival:** Scheduled at 8:31 PM (Atlanta Time), at Hartsfield-Jackson Intl (ATL)\n   - **Aircraft:** Boeing 737-900 (B739)\n   - **Status:** Scheduled\n   - **Terminal at Atlanta:** S\n   - **Estimated arrival slightly early**: 8:26 PM\n\n2. **Delta Airlines Flight DL542**\n   - **Departure:** Scheduled at 12:00 PM (Seattle Time), Gate A4, from Seattle-Tacoma Intl (SEA)\n   - **Arrival:** Scheduled at 4:49 PM (Atlanta Time), at Hartsfield-Jackson Intl (ATL)\n   - **Aircraft:** Boeing 737-900 (B739)\n   - **Status:** Scheduled\n   - **Gate at Atlanta:** E10, Terminal: S\n   - **Estimated early arrival**: 4:44 PM\n\n3. **Delta Airlines Flight DL554**\n   - **Departure:** Scheduled at 10:15 AM (Seattle Time), Gate A10, from Seattle-Tacoma Intl (SEA)\n   - **Arrival:** Scheduled at 4:05 PM (Atlanta Time), at Hartsfield-Jackson Intl (ATL)\n   - **Aircraft:** Boeing 737-900 (B739)\n   - **Status:** Scheduled\n   - **Gate at Atlanta:** B19, Terminal: S\n   - **Estimated late arrival**: 4:06 PM\n\n4. **Alaska Airlines Flight AS334**\n   - **Departure:** Scheduled at 9:16 AM (Seattle Time), Gate C20, from Seattle-Tacoma Intl (SEA)\n   - **Arrival:** Scheduled at 5:08 PM (Atlanta Time), at Hartsfield-Jackson Intl (ATL)\n   - **Aircraft:** Boeing 737-900 (B739)\n   - **Status:** Scheduled\n   - **Gate at Atlanta:** C5, Terminal: N\n\nThese are just a few of the direct flights available. Please let me know if you need more details on any other specific flight."
    },
    {
      "role": "user",
      "content": "What is the weather in Atlanta and what flight goes from Seattle to Atlanta?"
    }
  ],
  "max_tokens": 1000,
  "stream": false,
  "temperature": 1.0
}
