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

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

[nongnu] elpa/gptel 24add64455 114/273: gptel: Adjust how gptel--system-


From: ELPA Syncer
Subject: [nongnu] elpa/gptel 24add64455 114/273: gptel: Adjust how gptel--system-message is set
Date: Wed, 1 May 2024 10:02:10 -0400 (EDT)

branch: elpa/gptel
commit 24add6445548f8f3083d5aa855bffbf51ae0847e
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>

    gptel: Adjust how gptel--system-message is set
    
    * gptel.el (gptel--system-message, gptel-directives): Try to make
    gptel--system-message read from gptel-directives.  This doesn't yet work how
    we need it to -- changing gptel-directives does not update
    gptel--system-message.
---
 gptel.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/gptel.el b/gptel.el
index 0871826ddd..a9913ab5d1 100644
--- a/gptel.el
+++ b/gptel.el
@@ -211,12 +211,8 @@ When clicked, CALLBACK will be called."
   (gptel--compat))
 
 ;; Model and interaction parameters
-(defvar-local gptel--system-message
-  "You are a large language model living in Emacs and a helpful assistant. 
Respond concisely.")
-(put 'gptel--system-message 'safe-local-variable #'gptel--always)
-
 (defcustom gptel-directives
-  `((default . ,gptel--system-message)
+  '((default . "You are a large language model living in Emacs and a helpful 
assistant. Respond concisely.")
     (programming . "You are a large language model and a careful programmer. 
Provide code and only code as output without any additional text, prompt or 
note.")
     (writing . "You are a large language model and a writing assistant. 
Respond concisely.")
     (chat . "You are a large language model and a conversation partner. 
Respond concisely."))
@@ -232,6 +228,9 @@ interactively call `gptel-send' with a prefix argument."
   :safe #'gptel--always
   :type '(alist :key-type symbol :value-type string))
 
+(defvar-local gptel--system-message (alist-get 'default gptel-directives))
+(put 'gptel--system-message 'safe-local-variable #'gptel--always)
+
 (defcustom gptel-max-tokens nil
   "Max tokens per response.
 



reply via email to

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