branch: elpa/gptel commit e3fdfdbd3b84e7cd4ae12b6c090c8571ceae1eab Author: nlev <4465144+nlevn...@users.noreply.github.com> Commit: GitHub <nore...@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.