[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gptel 5d74ec4de0 254/273: gptel: Set system message correc
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gptel 5d74ec4de0 254/273: gptel: Set system message correctly in gptel-request |
Date: |
Wed, 1 May 2024 10:02:45 -0400 (EDT) |
branch: elpa/gptel
commit 5d74ec4de0cfa2748ab0fcd703662c45d670fd8f
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
gptel: Set system message correctly in gptel-request
* gptel.el (gptel-request): let-bind `gptel--system-message`
correctly in `gptel-request`. The Anthropic API requires the
system message to be attached to the query differently from the
others, causing the let-bindings in `gptel-request` to not work as
expected. (#276)
---
gptel.el | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/gptel.el b/gptel.el
index 4dcb2f7013..8a014a4bb4 100644
--- a/gptel.el
+++ b/gptel.el
@@ -914,7 +914,8 @@ query data as usual, but do not send the request.
Model parameters can be let-bound around calls to this function."
(declare (indent 1))
- (let* ((gptel-stream stream)
+ (let* ((gptel--system-message system)
+ (gptel-stream stream)
(start-marker
(cond
((null position)
@@ -926,14 +927,11 @@ Model parameters can be let-bound around calls to this
function."
(set-marker (make-marker) position buffer))))
(full-prompt
(cond
- ((null prompt)
- (let ((gptel--system-message system))
- (gptel--create-prompt start-marker)))
+ ((null prompt) (gptel--create-prompt start-marker))
((stringp prompt)
;; FIXME Dear reader, welcome to Jank City:
(with-temp-buffer
- (let ((gptel--system-message system)
- (gptel-model (buffer-local-value 'gptel-model buffer))
+ (let ((gptel-model (buffer-local-value 'gptel-model buffer))
(gptel-backend (buffer-local-value 'gptel-backend buffer)))
(insert prompt)
(gptel--create-prompt))))
- [nongnu] elpa/gptel 5465271541 207/273: gptel: Add gpt-4-0125-preview to model list (Fix #215), (continued)
- [nongnu] elpa/gptel 5465271541 207/273: gptel: Add gpt-4-0125-preview to model list (Fix #215), ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 43f625ecb9 209/273: gptel-openai: curl-args slot in gptel-backend (#221), ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel d502ad8ecb 222/273: test-gptel-org: Add markdown conversion tests, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 9925dc91b4 223/273: gptel: Improve markdown converter, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel dade9ec8e1 231/273: gptel: Add introspection commands, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 7e6b106516 233/273: gptel-transient: Change menu display, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 26326c302e 249/273: gptel-anthropic: Parsing fix, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 22f7043c32 242/273: gptel: Fix gptel-end-of-response, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 94b13e78ec 239/273: gptel-transient: enable additional directive by default, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel f24ec164cd 251/273: gptel: Adjust doc-string, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 5d74ec4de0 254/273: gptel: Set system message correctly in gptel-request,
ELPA Syncer <=
- [nongnu] elpa/gptel 53ee34653e 252/273: gptel-openai: Typo in gptel--json-read, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel f2fd2b13b0 257/273: gptel-org: Move response transform code for Org, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel e994a443d3 262/273: README: add OpenRouter instructions (#282), ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 7b6e3c5900 260/273: gptel: Release v0.8.5, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 4d4b61af94 259/273: gptel-transient: More robust dry-run commands, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 70889ad95c 263/273: gptel-gemini: Add Gemini 1.5 (#284), ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 4273f067e8 271/273: gptel-org: Improve stream converter, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel c319966997 272/273: gptel-org: Further improve stream converter, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 040baad910 034/273: gptel: Remove aio dependency, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 1828dd3fa4 050/273: gptel: Set "waiting" state after sending the prompt, ELPA Syncer, 2024/05/01