[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gptel 5c3b26aeec 138/273: gptel-curl: Tweak Curl arguments
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gptel 5c3b26aeec 138/273: gptel-curl: Tweak Curl arguments for windows |
Date: |
Wed, 1 May 2024 10:02:15 -0400 (EDT) |
branch: elpa/gptel
commit 5c3b26aeece94c65ac605613c502767cc97478a5
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
gptel-curl: Tweak Curl arguments for windows
gptel-curl.el (gptel-curl--common-args, gptel-curl--get-args):
Don't use compression with Curl on Windows, since it seems to
be generally not supported. Fix #90.
---
gptel-curl.el | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/gptel-curl.el b/gptel-curl.el
index dc0b1f3599..8f5e070b80 100644
--- a/gptel-curl.el
+++ b/gptel-curl.el
@@ -34,6 +34,14 @@
(require 'map)
(require 'json)
+(defconst gptel-curl--common-args
+ (if (memq system-type '(windows-nt ms-dos))
+ '("--disable" "--location" "--silent" "-XPOST"
+ "-m300" "-D-")
+ '("--disable" "--location" "--silent" "--compressed"
+ "-XPOST" "-m300" "-D-"))
+ "Arguments always passed to Curl for gptel queries.")
+
(defvar gptel-curl--process-alist nil
"Alist of active GPTel curl requests.")
@@ -52,11 +60,8 @@ PROMPTS is the data to send, TOKEN is a unique identifier."
(funcall backend-header)
backend-header)))))
(append
- (list "--location" "--silent" "--compressed" "--disable"
- (format "-X%s" "POST")
- (format "-w(%s . %%{size_header})" token)
- (format "-m%s" 300)
- "-D-"
+ gptel-curl--common-args
+ (list (format "-w(%s . %%{size_header})" token)
(format "-d%s" data))
(when (not (string-empty-p gptel-proxy))
(list "--proxy" gptel-proxy
- [nongnu] elpa/gptel 3d98ce8eee 099/273: gptel: Add new turbo 0613 models (#77), (continued)
- [nongnu] elpa/gptel 3d98ce8eee 099/273: gptel: Add new turbo 0613 models (#77), ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel b92fc389d7 105/273: gptel: Reduce verbosity of gptel--save-state, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 33d8434f3e 006/273: gptel: Tweak header line format, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel c2ad1c004d 054/273: Decode response body as utf-8 and then parse as json, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 1f03655e2d 056/273: Add Doom Emacs installation instructions (#28), ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 936c27e28b 058/273: gptel: Fix header-line-format update, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel acf12ee6e3 073/273: gptel: return the gptel buffer, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 706ad703db 090/273: gptel-transient: Allow arbitrary system prompts/directives, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel a5be53d5e3 084/273: gptel: Update version, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 0f161a466b 109/273: gptel: saving and restoring state for Markdown/Text, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 5c3b26aeec 138/273: gptel-curl: Tweak Curl arguments for windows,
ELPA Syncer <=
- [nongnu] elpa/gptel 15404f639d 139/273: README: Update instructions for Azure (#147), ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel ddd69cbbcf 147/273: gptel-curl: Replace Curl timeout with speed-time, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 60cb406567 162/273: gptel: Improve documentation of gptel-send, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 8ec233d79c 174/273: gptel: Name gptel buffer according to backend, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 235134a176 186/273: Bit of feedback when copying reponse to kill ring, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 50fb34ab7c 187/273: Fix compilation warnings, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 10f57605ce 195/273: gptel: Improve Org stream conversion, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 6a385ffc2f 199/273: README: Add FAQ entry for OpenAI quota error (#93), ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 199595b0c8 216/273: gptel: Handle status HTTP 100, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel b634f05fe5 218/273: gptel: Tweak markdown to org conversion, ELPA Syncer, 2024/05/01