Did you replace this line $api_key = 'YOUR_OPENAI_API_KEY'; with your API key?
I think it's most likely related to your API code if the question is being asked directly without the notification window opening. When I tested it with different sites and API codes, it seems to be working fine. However, I will still check it.