Skip to content

Commonly requested features

karthink edited this page Jun 25, 2024 · 1 revision

How to achieve some commonly requested gptel behavior.

Save transient flags

Any options you set from gptel's transient menu (except for the model parameters) are only active for the next query. If you want these flags to be persistent, you can press C-x s when in the transient menu:

gptel-save

Now options you choose will remain set until you change them. Pressing C-x C-s will save them across Emacs sessions.

However, you still have to bring up the menu to send a query with these saved options. You can replace your usage of gptel-send with the following command if you want these options to be applied without having to bring up the menu:

(defun gptel-send-with-options (&optional arg)
  "Send query.  With prefix ARG open gptel's menu instead."
  (interactive "P")
  (if arg
      (call-interactively 'gptel-menu)
    (gptel--suffix-send (transient-args 'gptel-menu))))
Clone this wiki locally