branch: elpa/gptel commit 35b752f00bf22682659350f07b4ea5c2dfb9a36b Author: Karthik Chikmagalur <karthikchikmaga...@gmail.com> Commit: Karthik Chikmagalur <karthikchikmaga...@gmail.com>
gptel: Reduce Windows curl-file-size-threshold * gptel.el (gptel-curl-file-size-threshold): Reduce value for Windows by #x1000 to account for non-data Curl CLI args. (#873) --- gptel.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gptel.el b/gptel.el index 9e86a64b51..d5a1bd1a8a 100644 --- a/gptel.el +++ b/gptel.el @@ -275,7 +275,7 @@ This only affects requests originating from Org mode buffers." :type 'boolean) (defcustom gptel-curl-file-size-threshold - (if (memq system-type '(windows-nt ms-dos)) 32766 130000) + (if (memq system-type '(windows-nt ms-dos)) #x6ffe 130000) "Size threshold for using file input with Curl. Specifies the size threshold for when to use a temporary file to pass data to @@ -292,8 +292,12 @@ A larger value may improve performance by avoiding the overhead of creating temporary files for small data payloads, while a smaller value may be needed if the command-line argument size is limited by the operating system. -The default for windows comes from Microsoft documentation located here: -https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa" +The default of #x8000 for windows comes from Microsoft documentation +located here: +https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa + +It is set to (#x8000 - #x1000 - 2) to account for other (non-data) Curl +command line arguments." :type 'natnum) (define-obsolete-variable-alias 'gptel-prompt-filter-hook