Closed teto closed 10 months ago
I had this problem too. You need to remove the quotes around 'api.openai.com'
; otherwise, the resulting urls will look something like https://'api.openai.com'/v1/completions
. If you want to see what exactly went wrong, you could insert a statement such as logger.warn(Api.COMPLETIONS_URL)
inside the loadApiHost
callback inside api.lua
. It isn't pretty, but it helped me solve my problem.
thanks that fixed it.
Got same error message.
After some trying, I realized that api_host_cmd
is not working as expected.
For example, api_host_cmd = "echo -n 'api.notopenai.com'"
, it always returns curl: (3) URL rejected: Bad hostname
.
But if I run export OPENAI_API_HOST=api.notopenai.ai
in terminal and not use api_host_cmd
, it works fine.
It's weird, did I miss some of the relevant descriptions in the README?
When updating to master 9f8062c7c40ec082c49f10e20818333a972b8063 I get
curl: (3) URL rejected: Bad hostname
with the followingOne of my issues is that I dont see the host used, is there some logging I could enable ? might be worth adding some checkhealth command to help debug https://neovim.io/doc/user/pi_health.html#health-commands