From ddd69cbbcf88139c620b803bc79909e08778a43e Mon Sep 17 00:00:00 2001 From: Karthik Chikmagalur Date: Wed, 20 Dec 2023 15:25:59 -0800 Subject: [PATCH] gptel-curl: Replace Curl timeout with speed-time * gptel-curl.el (gptel-curl--common-args): Following the discussion in #143, Use "-y300 -Y1" as Curl arguments instead of specifying the timeout. Now the connection stays open unless less than 1 byte of information is exchanged over 300 seconds. --- gptel-curl.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gptel-curl.el b/gptel-curl.el index 9035873..f8aa63a 100644 --- a/gptel-curl.el +++ b/gptel-curl.el @@ -37,9 +37,9 @@ (defconst gptel-curl--common-args (if (memq system-type '(windows-nt ms-dos)) '("--disable" "--location" "--silent" "-XPOST" - "-m300" "-D-") + "-y300" "-Y1" "-D-") '("--disable" "--location" "--silent" "--compressed" - "-XPOST" "-m300" "-D-")) + "-XPOST" "-y300" "-Y1" "-D-")) "Arguments always passed to Curl for gptel queries.") (defvar gptel-curl--process-alist nil