branch: elpa/gptel
commit 13fd0064fce42fd4ea11ea3a5bcbee33ac30a197
Author: rosenstrauch <[email protected]>
Commit: GitHub <[email protected]>
gptel-privategpt: pass system message correctly (#531)
gptel-privategpt.el (gptel--request-data): Add system message correctly
when the model supports it
---
gptel-privategpt.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gptel-privategpt.el b/gptel-privategpt.el
index 0eca517af2..4158adf6c2 100644
--- a/gptel-privategpt.el
+++ b/gptel-privategpt.el
@@ -92,6 +92,9 @@
:stream ,(or (and gptel-stream gptel-use-curl
(gptel-backend-stream gptel-backend))
:json-false))))
+ (when (and gptel--system-message
+ (not (gptel--model-capable-p 'nosystem)))
+ (plist-put prompts-plist :system gptel--system-message))
(when gptel-temperature
(plist-put prompts-plist :temperature gptel-temperature))
(when gptel-max-tokens