jackMort / ChatGPT.nvim

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

Add the ability to use additional parameters in requests #372

Closed Mephistophillis closed 5 months ago

Mephistophillis commented 5 months ago

Good day! Since the official API is not accessible in my country, I must rely on third-party alternatives. Some of them require the inclusion of specific request headers, such as 'Origin' and 'Referrer.' The modifications in this pull request enable the specification of these headers without causing any breaking changes.

I have also added a description of usage in the README.

kohane27 commented 5 months ago

Awesome! I need to use a VPN as well and adding the following works flawlessly:

extra_curl_params = { "--proxy", "http://127.0.0.1:8888" },

Thank you for the PR!