gptel
gptel copied to clipboard
feature request: additional curl arguments
Hello, great package, however my proxy setup(out of my control) requires curl arguments like -k
or --ssl-no-revoske
to work. Would you be able to add additional user argument to curl. Thanks.
This is available via the :curl-args
slot of a gptel backend definition.
For example:
(gptel-make-openai "ChatGPT-no-ssl-check"
:key 'gptel-api-key
:stream t
:models '("gpt-3.5-turbo" "gpt-3.5-turbo-16k" "gpt-4"
"gpt-4-turbo-preview" "gpt-4-32k" "gpt-4-1106-preview"
"gpt-4-0125-preview")
:curl-args '("--ssl-no-revoke" "-k"))
If you want this globally, you can add it to gptel-curl--common-args
instead, which see.
hi thanks. I can't change gptel-curl--common-args
though. it's a constant.
hi thanks. I can't change gptel-curl--common-args though. it's a constant.
Does adding :curl-args to the backend definition not work for you?
On second thought I don't want to make gptel-curl--common-args
customizable, since removing things from it will break gptel. I suggest adding :curl-args
to the gptel backend you want to use.
For ChatGPT in particular, you can use the code I provided above, OR add it to the pre-defined backend using:
(setf (gptel-backend-curl-args gptel--openai)
'("--ssl-no-revoke" "-k"))
For any other LLM provider you can add :curl-args
to the setup code provided in the README.
yes it did work with :curl-args
however I have to add it to every backend I use..