Closed joostshao closed 5 months ago
curl https://workers-playground-little-paper-80b2.sjtlqy.workers.dev/v1/chat/completions \ -H "Authorization: Bearer AIzaSyAJaC2_HRoQlWYanWPm2S-xxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "Hello"}], "temperature": 0.7 }'
Error: [400 FAILED_PRECONDITION] User location is not supported for the API use.#
之前还是好的,奇怪了,这是怎么回事?
Cloudflare Workers tends to be as closer to user as possible. So perhaps you are located not in "Available regions" of Gemini.
Solution: deploy on Vercel.
thank you
curl https://workers-playground-little-paper-80b2.sjtlqy.workers.dev/v1/chat/completions \ -H "Authorization: Bearer AIzaSyAJaC2_HRoQlWYanWPm2S-xxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "Hello"}], "temperature": 0.7 }'
Error: [400 FAILED_PRECONDITION] User location is not supported for the API use.#
之前还是好的,奇怪了,这是怎么回事?