How can I fix my Flask server‘s 405 error that includes OpenAi api?

题意:解决包含OpenAI API的Flask服务器中出现的405错误(Method Not Allowed,即方法不允许)

问题背景:

I'm trying to add an API to my webpage and have never used any Flask server before, I have never used Javascript too so this is a completely brand new learning experience. My problem is that I keep receiving a 405 error code saying that the method is not allowed. I keep on using the POST method but it isn't working, I am banking that my issue may be with my HTML code more than my Flask server because the code is extremely generic and simple.

我正在尝试将API添加到我的网页中,但我之前从未使用过任何Flask服务器,也从未使用过JavaScript,所以这对我来说是完全全新的学习体验。我的问题是,我不断收到405错误代码,表示方法不允许。我一直在使用POST方法,但它不起作用。我认为我的问题可能更多地出在我的HTML代码上&#

你可能感兴趣的:(AI,ai,python,javascript,flask,openai,api)