x-dr / chatgptProxyAPI

🔥 使用cloudflare 搭建免费的 OpenAI api代理 ,解决网络无法访问问题。支持流式输出
https://chatai.451024.xyz
MIT License
2.95k stars 678 forks source link

提示需要https访问 #13

Closed onlyLTY closed 1 year ago

onlyLTY commented 1 year ago
{
  "error": {
    "message": "The OpenAI API can only be accessed over HTTPS. You should access https://api.openai.com rather than the current URL.",
    "type": "invalid_request_error"
  }
}

请求是

curl --location 'https://chatapi.xxx.xxx/v1/chat/completions' \
--header 'Authorization: Bearer sk-xxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
   "model": "gpt-3.5-turbo",
  "messages": [{"role": "user", "content": "Hello!"}]
 }'
x-dr commented 1 year ago

你是用Cloudflare Worker还是Cloudflare Pages部署的?有修改过吗?

onlyLTY commented 1 year ago

你是用Cloudflare Worker还是Cloudflare Pages部署的?有修改过吗?

worker,没有修改过

x-dr commented 1 year ago

你是用Cloudflare Worker还是Cloudflare Pages部署的?有修改过吗?

worker,没有修改过

那就不清楚了了,你重新部署一下看看