Robitx / gp.nvim

Gp.nvim (GPT prompt) Neovim AI plugin: ChatGPT sessions & Instructable text/code operations & Speech to text [OpenAI]
MIT License
537 stars 50 forks source link

[Feature request] proxy support for curl? #42

Closed kohane27 closed 8 months ago

kohane27 commented 8 months ago

Hello there. Hope you're doing well. Thank you for creating this llm plugin. This plugin of yours suits my workflow better, so thank you very much!

Description

I'm using proton-privoxy because I need to use a proxy through a VPN to access api.openai.com .

I'm writing to see if you're willing to add support for proxy?

Expected behavior

Currently I can use below:

curl --proxy http://127.0.0.1:8888 ifconfig.co/json | jq

Could you please add some kind of configuration to allow users to use curl through a proxy?

Thank you again!

Robitx commented 8 months ago

@kohane27 Hey, the latest version supports curl_params = { "--proxy", "http://X.X.X.X:XXXX", .. } in config.

kohane27 commented 8 months ago

Thank you so much for such a quick response and even quicker impl!

Just tested and it works perfectly! The curl requests are going thorugh the proton-privoxy. Thank you again!