[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gptel 7cf8e3b19b 11/11: gptel: Fix gptel--parse-directive
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gptel 7cf8e3b19b 11/11: gptel: Fix gptel--parse-directive |
Date: |
Sat, 30 Nov 2024 07:00:05 -0500 (EST) |
branch: elpa/gptel
commit 7cf8e3b19b81c82b2c4c6e3732db9fd449c67de9
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
gptel: Fix gptel--parse-directive
gptel.el (gptel--parse-directive): Add missing 'raw' argument.
This change was lost in the feature-templates merge.
---
gptel.el | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/gptel.el b/gptel.el
index 3e91d91b47..2aa0997d5c 100644
--- a/gptel.el
+++ b/gptel.el
@@ -1022,22 +1022,26 @@ replaced with REPLACEMENT."
from-template width)))
(t "")))
-(defun gptel--parse-directive (directive)
+(defun gptel--parse-directive (directive &optional raw)
"Parse DIRECTIVE into a backend-appropriate form.
DIRECTIVE is a gptel directive: it can be a string, a list or a
function that returns either, see `gptel-directives'.
Return a cons cell consisting of the system message (a string)
-and a template consisting of alternating user/assistant
-records (a list of strings or nil)."
+and a template consisting of alternating user/LLM
+records (a list of strings or nil).
+
+If RAW is non-nil, the user/LLM records are not processed and are
+returned as a list of strings."
(and directive
(cl-etypecase directive
(string (list directive))
(function (gptel--parse-directive (funcall directive)))
- (cons (cons (car directive)
- (gptel--parse-list
- gptel-backend (cdr directive)))))))
+ (cons (if raw directive
+ (cons (car directive)
+ (gptel--parse-list
+ gptel-backend (cdr directive))))))))
- [nongnu] elpa/gptel updated (a84461245e -> 7cf8e3b19b), ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel 4ae9c1b24c 06/11: gptel-rewrite: Improve rewrite UI and feature, ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel c645444de9 09/11: README: Fix formatting errors, mention more packages, ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel 04da0a42af 10/11: gptel: Truncate function documentation to newline, ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel d177822a7f 01/11: README: Add a section about selecting backends explicitly (#467), ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel ffed97d2e4 05/11: gptel: Adjust persistence for dynamic directives, ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel 41158decde 08/11: README: Reorder, adjust formatting, ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel 7cf8e3b19b 11/11: gptel: Fix gptel--parse-directive,
ELPA Syncer <=
- [nongnu] elpa/gptel 10752576e4 02/11: gptel: Move system-message to gptel--request-data, ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel 67903a1ac5 04/11: gptel: Generalize gptel directives, ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel 0dacb474f8 03/11: gptel: Add generic gptel--parse-list function, ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel f887dadb49 07/11: gptel-rewrite: Rewrite directive handling changes, ELPA Syncer, 2024/11/30