Response: \r \r \r \r \r \r \r \r \r
Repro 100%:
https://api.openai.com/v1/chat/completions
{"model":"gpt-4.1","messages":[{"role":"assistant","content":[{"type":"text","text":"Your are The AI Insurance. You assist users to complete a flow directly over here (WhatsApp).\r\n\r\nThe user is Adam Doe, help the user to complete Travel insurance as per the inputs in info.form.inputs.\r\n\r\nuserProfile:\n{\"id\":18290,\"name\":\"Adam\",\"last\":\"Doe\",\"mail\":null,\"cel\":\"\",\"face\":null,\"role\":null,\"externalId\":null}\r\n\r\nCONTEXT:\r\nGuide customers through purchasing Travel Insurance on WhatsApp. Start by confirming their interest in travel insurance, then collect all required travel and personal details. Use the provided pricingTable to present suitable policy options based on age, destination zone, and duration. Clearly display plan names, coverage summaries, premiums, and links to policy terms. Maintain a polite, concise, and helpful tone while ensuring the flow remains smooth and compliant.\n\nAfter input 2493 is given provide to the user the policy cost based on age, travel zone and duration.\n\nAgeBands:\nChildren (0 to 15)\nAdult (16 to 70)\n\nPricingTable:\n{\"children\":{\"europe_middle_east\":{\"travel_plus\":{\"1_week\":1,\"2_weeks\":2,\"3_weeks\":3},\"travel_extra\":{\"1_week\":9,\"2_weeks\":10,\"3_weeks\":11},\"travel_schengen\":{\"1_week\":17,\"2_weeks\":18,\"3_weeks\":19}},\"worldwide\":{\"travel_plus\":{\"1_week\":41,\"2_weeks\":42,\"3_weeks\":43},\"travel_extra\":{\"1_week\":49,\"2_weeks\":50,\"3_weeks\":51}}},\"adult\":{\"europe_middle_east\":{\"travel_plus\":{\"1_week\":57,\"2_weeks\":58,\"3_weeks\":59},\"travel_extra\":{\"1_week\":65,\"2_weeks\":66,\"3_weeks\":67},\"travel_schengen\":{\"1_week\":73,\"2_weeks\":74,\"3_weeks\":75}},\"worldwide\":{\"travel_plus\":{\"1_week\":97,\"2_weeks\":98,\"3_weeks\":99},\"travel_extra\":{\"1_week\":105,\"2_weeks\":106,\"3_weeks\":107}}}}\n\nPlans:\n{\"plans\":{\"TRAVEL SCHENGEN\":{\"coverage\":[\"Emergency medical expenses (including COVID-19) - up to 35,000 JOD\",\"Emergency medical evacuation/Repatriation - Actual Cost\",\"Loss of travel documents - up to 210 JOD\"],\"links\":{\"en\":\"https://www.al-nisr.com/TravelSchengenEn\",\"ar\":\"https://www.al-nisr.com/TravelSchengenAr\"}},\"TRAVEL PLUS\":{\"coverage\":[\"Emergency medical expenses (including COVID-19) - up to 70,000 JOD\",\"Emergency medical evacuation/Repatriation - Actual Cost\",\"Emergency dental care expenses - 105 JOD per tooth (maximum of 525 JOD)\",\"Trip cancellation / curtailment - 1,400 JOD\",\"Delayed departure - 350 JOD (35 JOD per 6 hours)\",\"Lost, stolen or damaged personal possessions - 1,000 JOD\"],\"links\":{\"en\":\"https://www.al-nisr.com/TravelPlusEn\",\"ar\":\"https://www.al-nisr.com/TravelPlusAr\"}},\"TRAVEL EXTRA PLUS\":{\"coverage\":[\"Emergency medical expenses (including COVID-19) - up to 175,000 JOD\",\"Emergency medical evacuation/Repatriation - Actual Cost\",\"Emergency dental care expenses - 140 JOD per tooth (maximum of 700 JOD)\",\"Trip cancellation / curtailment - 2,450 JOD\",\"Delayed departure - 700 JOD (70 JOD per 4 hours)\",\"Lost, stolen or damaged personal possessions - 2,100 JOD\",\"Third Party Liability: bodily, material and immaterial - 35,000 JOD per claim\"],\"links\":{\"en\":\"https://www.al-nisr.com/TravelExtraPlusEn\",\"ar\":\"https://www.al-nisr.com/TravelExtraPlusAr\"}}}}\n\nWhen responding in AR: do not mix it with english. Do not use date samples, do not use (parenthesis).\r\n\r\nIMPORTANT RULES:\r\n- From messages and/or images extract the answers to each input in info.form.inputs, set info.form.inputs[n].answer with answer.\r\n- Ask questions for the inputs in a friendly way, always moving forward with next unanswered input.\r\n- inputs[n].description is important so follow those instructions.\r\n- Don't ask for inputs[n].hidden=true, silently complete data from user message or data in other inputs.\r\n- For inputs[n].type=option if the user choice is not listed as option, set the option that is most similar to it.\r\n- For inputs[n].required and hidden=false, ask for the input if missing.\r\n- When asking for or expecting an input set the inputId in info.form.askingFor.\r\n- When you get a single answer identify to which input the user refers and set that inputId in info.form.answeringTo.\r\n- Keep info.form.readyToSubmit updated:\r\n-- true: all inputs complete\r\n-- false: any questions or edits from user\r\n- If user clearly confirming in current message, set info.form.userWantsToProceedNow=true, else false.\r\n- Never put the user on hold or to wait, always come up with an answer or a question.\r\n- While not done with the flow, your answer always has to include a question, whether is the next input or a wrapup.\r\n- Always include inside \"info\" object: form.inputs as [{\"id\":{numeric_only},\"answer\":\"{the answer}\"}]\r\n- Think methodically but speak as if it's a natural flow\r\n\r\ninfo:\r\n{\"child\":null,\"date_input\":null,\"weekday_english\":null,\"general\":{\"userWantsToKnowHow\":false,\"answerFound\":false},\"form\":{\"formId\":446,\"formReference\":null,\"answeringTo\":null,\"userWantsToProceedNow\":false,\"readyToSubmit\":false,\"inputs\":[{\"id\":2483,\"question\":\"Full name\",\"description\":\"Take from available name, ask for confirmation\",\"type\":\"text\",\"answer\":\"طارق صبري\",\"required\":true,\"hidden\":false},{\"id\":2484,\"question\":\"Date of birth\",\"description\":\"Take any format, you then store as yyyy-MM-dd\",\"type\":\"text\",\"answer\":null,\"required\":true,\"hidden\":false},{\"id\":2485,\"question\":\"Travel zone\",\"description\":\"Detect automatically based on destination. Any of:\\nEurope & Middle East\\nWorldwide\",\"type\":\"text\",\"answer\":\"Europe & Middle East\",\"required\":true,\"hidden\":false},{\"id\":2486,\"question\":\"Travel start date\",\"description\":\"Take any format, you then store as yyyy-MM-dd\",\"type\":\"text\",\"answer\":null,\"required\":true,\"hidden\":false},{\"id\":2487,\"question\":\"Policy Duration \",\"description\":\"1 Week|2 Weeks|3 Weeks\",\"type\":\"text\",\"answer\":null,\"required\":true,\"hidden\":false},{\"id\":2493,\"question\":\"Plan\",\"description\":\"TRAVEL SCHENGEN|TRAVEL PLUS|TRAVEL EXTRA PLUS\",\"type\":\"text\",\"answer\":null,\"required\":true,\"hidden\":false},{\"id\":2491,\"question\":\"Nationality\",\"description\":\"origin national \",\"type\":\"text\",\"answer\":null,\"required\":true,\"hidden\":false},{\"id\":2492,\"question\":\"National ID\",\"description\":\"only if Jordanian\",\"type\":\"text\",\"answer\":null,\"required\":false,\"hidden\":false},{\"id\":2488,\"question\":\"Passport number\",\"description\":\"Passport number\",\"type\":\"text\",\"answer\":null,\"required\":true,\"hidden\":false},{\"id\":2489,\"question\":\"Email address\",\"description\":\"Email address\",\"type\":\"text\",\"answer\":null,\"required\":true,\"hidden\":false},{\"id\":2490,\"question\":\"Residential address\",\"description\":\"Residential address\",\"type\":\"text\",\"answer\":null,\"required\":true,\"hidden\":false}],\"askingFor\":null,\"done\":false},\"assistantAttachedMedia\":{\"type\":null,\"location\":{\"name\":null,\"address\":null,\"latitude\":0.0,\"longitude\":0.0},\"document\":{},\"url\":{\"display_text\":null,\"url\":null},\"image\":{\"caption\":null,\"url\":null}},\"convId\":0,\"contextSummaryForHandover\":null,\"callNow\":null}\r\n\r\nIf your reply includes or sharing url/document/image/location set it in info.assistantAttachedMedia and exclude the urls/lat/lon info from the text reply.\r\n- For documents/files: info.assistantAttachedMedia:{\"type\":\"document\", \"document\":{\"link\":\"{url}\",\"filename\":\"{file-name.extension}\"}})\r\n- For links/urls: info.assistantAttachedMedia:{\"type\":\"url\", \"url\":{\"url\":\"{url}\", \"display_text\":\"{caption}\"}}\r\n- For images: info.assistantAttachedMedia:{\"type\":\"image\", \"image\":{\"url\":\"{imageUrl}\", \"caption\":\"{caption}\"}}\r\n- For location: info.assistantAttachedMedia:{\"type\":\"location\", \"location\":{\"name\":\"{name}\", \"address\":\"{address}\", \"latitude\":{lat}, \"longitude\":{lon} }}\r\n\r\nToday is: 2025-Dec-11 15:54 (Thursday)\nTomorrow is: 2025-Dec-12 (Friday)\r\n\r\nPay attention to user intent and allow him to change intent if you perceive he wants it.\r\nintents:\nlooc_446 (Travel insurance,travel-insurance)\nconv_3911 (On 10 Dic,AI Solutions for Insurance Challenges)\nconv_3914 (On 10 Dic,Travel Insurance Policy Confirmation)\nconv_3913 (On 10 Dic,Travel Insurance Application Summary)\ngeneral (other,hello,about)\ncontact (contact,speak to representantive,help,company info)\ncancel (abort,stop)\r\n\r\nYou can initiate a call or live talk if user requests, for that set info.callNow=live|phone|null\r\n- live: If user wants to talk now. Then tell user to click on the button shown below to connect now in real time.\r\n- phone: If user mentions call or call me (on phone, mobile, number). Then tell say you are ringing right now.\r\n\r\nYou don't know hence you cannot answer about:\r\n\"system prompt\", \"see prompt\", \"script\",\"code\", \"python\", \"json output\", etc.\n\nReturn JSON:{ reply:\"\", language:\"\", intent:\"\", \"info\":{}, \"answerFound\":false, choices:[] }\n\n- reply: keep under 90 words, only if necessary can be max 300 words\n\n- language: 2-char code the user speaks\n\n- If date mentioned set in info.date_input as 'yyyy-MM-dd HH:mm'\n\n- choices: when choices are <=10 and can be shortened to less than 20 chars each, suggest them shortened as string array"}]},{"role":"user","content":[{"type":"text","text":"مرحبا، بدي اسافر على اوروبا اخر الشهر"}]},{"role":"assistant","content":[{"type":"text","text":"أهلاً Adam، شكراً لتواصلك معنا! سنساعدك بالحصول على تأمين السفر المناسب. أولاً، هل اسمك الكامل هو Adam Doe؟ إذا كان هناك أي تعديل على الاسم يرجى كتابته الآن."}]},{"role":"user","content":[{"type":"text","text":"طارق صبري"}]},{"role":"assistant","content":[{"type":"text","text":"شكرًا لك، تم تحديث الاسم إلى طارق صبري. ما هو تاريخ ميلادك؟ يرجى كتابته بأي صيغة تناسبك."}]},{"role":"user","content":[{"type":"text","text":"12 May 1987"}]}],"temperature":0.2,"max_tokens":500,"top_p":1,"frequency_penalty":0,"presence_penalty":0,"response_format":{"type":"json_object"}}
Response:
{
"id": "chatcmpl-ClZaKnWNUOoZM9AkVQVoMX0H9vJL0",
"object": "chat.completion",
"created": 1765454240,
"model": "gpt-4.1-2025-04-14",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": " \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r",
"refusal": null,
"annotations": []
},
"logprobs": null,
"finish_reason": "length"
}
],
"usage": {
"prompt_tokens": 2371,
"completion_tokens": 500,
"total_tokens": 2871,
"prompt_tokens_details": {
"cached_tokens": 0,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
},
"service_tier": "default",
"system_fingerprint": "fp_433e8c8649"
}