Skip to content

Commit

Permalink
drive-by kagi string trimming update
Browse files Browse the repository at this point in the history
This was an opportunistic update, but it seems this model is obviously out of
use and will be abandoned soon

* gptel-kagi.el:
  • Loading branch information
psionic-k committed Mar 1, 2025
1 parent cc18cc4 commit 5fe062b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions gptel-kagi.el
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,10 @@
(user-error "No user prompt found!")
(let ((prompts
(if (or gptel-mode gptel-track-response)
(string-trim
(buffer-substring-no-properties (prop-match-beginning prop)
(prop-match-end prop))
(format "[\t\r\n ]*\\(?:%s\\)?[\t\r\n ]*"
(regexp-quote (gptel-prompt-prefix-string)))
(format "[\t\r\n ]*\\(?:%s\\)?[\t\r\n ]*"
(regexp-quote (gptel-response-prefix-string))))
(or (gptel--trim-prefixes
(buffer-substring-no-properties (prop-match-beginning prop)
(prop-match-end prop)))
"")
(string-trim (buffer-substring-no-properties (point-min) (point-max))))))
(pcase-exhaustive (gptel--model-name gptel-model)
("fastgpt" (setq prompts (list :query (if (prop-match-p prop) prompts ""))))
Expand Down

0 comments on commit 5fe062b

Please sign in to comment.