karthink / gptel

A simple LLM client for Emacs
GNU General Public License v3.0
1.28k stars 128 forks source link

gptel: Allow setting custom curl path #145

Open rleppink opened 10 months ago

rleppink commented 10 months ago

This commit allows the user to set a custom path to the curl executable.

Windows has some strange notions of what "curl" is, and this can't always be changed easily. With this variable, a user can let gptel use the curl executable of their choosing -- allowing full response streaming.

The default is still set to the same value it was: "curl".

karthink commented 10 months ago

@rleppink Thank you for the PR, I don't have a Windows PC right now to test gptel.

I think we can combine the two variables (gptel-curl-path and gptel-use-curl) into one (gptel-use-curl), which will be set to the curl path ((executable-find "curl") by default instead of t. Do you see any problems with this?

rleppink commented 9 months ago

From an end user perspective, I personally think it's more clear that use-curl is a boolean value indicating whether to use it, and curl-path is a string to curl's path.

Overloading use-curl to a string containing the path to curl seems a bit confusing for an end user.

karthink commented 9 months ago

From an end user perspective, I personally think it's more clear that use-curl is a boolean value indicating whether to use it, and curl-path is a string to curl's path.

Overloading use-curl to a string containing the path to curl seems a bit confusing for an end user.

Okay. We can go the other way and replace gptel-use-curl with gptel-curl-path then. We can define gptel-use-curl as an obsolete-variable-alias of gptel-curl-path.

karthink commented 4 months ago

@rleppink Are you still interested in adding a gptel-curl-path?