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.
This commit is contained in:
parent
f0b18c5f8b
commit
24add64455
1 changed files with 4 additions and 5 deletions
9
gptel.el
9
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.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue