Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gptel: Allow setting custom curl path #145

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rleppink
Copy link

@rleppink rleppink commented Dec 7, 2023

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
Copy link
Owner

karthink commented Dec 8, 2023

@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
Copy link
Author

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
Copy link
Owner

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.

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.
@rleppink rleppink force-pushed the allow-setting-custom-curl-path branch from 3987ae9 to 9104d4f Compare March 11, 2024 09:11
@karthink karthink force-pushed the master branch 5 times, most recently from 440da06 to 9a5a4a6 Compare March 21, 2024 18:30
@karthink
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants