jackMort / ChatGPT.nvim

ChatGPT Neovim Plugin: Effortless Natural Language Generation with OpenAI's ChatGPT API
Apache License 2.0
3.75k stars 312 forks source link

feat(api): support custom api host #210

Closed lianghx-319 closed 1 year ago

lianghx-319 commented 1 year ago

In some countries, it is too hard to accessing OpenAI. So they can deploy it's own reverse proxy server to access openai API

lianghx-319 commented 1 year ago

I think it is same as OPEN_API_KEY, the host maybe treat as some kind of secret. So if allow to setup in configuration, maybe implement like OPEN_API_KEY is good. Set at environment is the easy way to make thing works. I will spend more time to support it to the configuration if necessary.

lianghx-319 commented 1 year ago

What do you think about adding it to the configuration rather than as an environment variable? You can still use your logic when setting up the plugin on your end

api host has aded to the configuration, can you review the final code implement?

you-n-g commented 1 year ago

Very exciting to see such PR. When would this PR be merged?

Thanks!

lianghx-319 commented 1 year ago

@jackMort Are you have time to have a look?