emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/gptel e3fdfdbd3b 2/2: gptel: allow customize-variable to s


From: ELPA Syncer
Subject: [nongnu] elpa/gptel e3fdfdbd3b 2/2: gptel: allow customize-variable to set temperature to nil (#777)
Date: Fri, 11 Apr 2025 19:00:31 -0400 (EDT)

branch: elpa/gptel
commit e3fdfdbd3b84e7cd4ae12b6c090c8571ceae1eab
Author: nlev <4465144+nlevnaut@users.noreply.github.com>
Commit: GitHub <noreply@github.com>

    gptel: allow customize-variable to set temperature to nil (#777)
    
    * gptel.el (gptel-temperature): Allow nil value when
    using customize-variable.
---
 gptel.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gptel.el b/gptel.el
index b7f8c9abf6..c0d1635068 100644
--- a/gptel.el
+++ b/gptel.el
@@ -481,8 +481,9 @@ of the response, with 2.0 being the most random.
 
 To set the temperature for a chat session interactively call
 `gptel-send' with a prefix argument."
-  :safe #'always
-  :type 'number)
+  :safe (lambda (v) (or (null v) (numberp v)))
+  :type '(choice (number :tag "Temperature value")
+                 (const :tag "Use default" nil)))
 
 (defcustom gptel-cache nil
   "Whether the LLM should cache request content.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]