Replies: 4 comments
-
You can use A more general solution is to use (defun gptel-tag-response (beg end)
(save-excursion
(goto-char end)
;; ending tag
(insert "</llm-content>\n\n<llm-prompt>")
(goto-char beg)
(skip-chars-backward " \n\r\t")
;; end of prompt tag
(insert "</llm-prompt>")
(skip-chars-forward " \n\r\t")
;; beginning of response tag
(insert (format "<llm-content model=\"%s\">\n"
gptel-model))))
(add-hook 'gptel-post-response-functions #'gptel-tag-response) Modify as needed. |
Beta Was this translation helpful? Give feedback.
-
Closing this now, please reopen if the above solution doesn't work. |
Beta Was this translation helpful? Give feedback.
-
Hi @karthink, Thank you for showing me how to do this! It works well, however, when I ran it, I had problems with it not putting text annotations in the correct spot. However, I am reopening as well because I realized a few more desirable features:
If you wish I can attempt to implement this in Elisp with Claude's help. Best, |
Beta Was this translation helpful? Give feedback.
-
None of these are features planned for gptel, so I'm moving this to discussions. To watermark text you can use |
Beta Was this translation helpful? Give feedback.
-
Hi,
I was wondering whether some feature such as the following could be implemented:
E.g.
Would become
(in hypothetical file: apartments.el)
Thanks!
Andrew
Beta Was this translation helpful? Give feedback.
All reactions