Skip to content

Commit

Permalink
README: Mention transient menu option saving
Browse files Browse the repository at this point in the history
* README.org (FAQ): Mention the option to save transient menu
options (see #94, #192).
  • Loading branch information
karthink committed Jan 22, 2024
1 parent e79e386 commit 43e0a12
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ GPTel uses Curl if available, but falls back to url-retrieve to work without ext
- [[#i-want-the-window-to-scroll-automatically-as-the-response-is-inserted][I want the window to scroll automatically as the response is inserted]]
- [[#i-want-the-cursor-to-move-to-the-next-prompt-after-the-response-is-inserted][I want the cursor to move to the next prompt after the response is inserted]]
- [[#i-want-to-change-the-formatting-of-the-prompt-and-llm-response][I want to change the formatting of the prompt and LLM response]]
- [[#i-want-the-transient-menu-options-to-be-saved-so-i-only-need-to-set-them-once][I want the transient menu options to be saved so I only need to set them once]]
- [[#i-want-to-use-gptel-in-a-way-thats-not-supported-by-gptel-send-or-the-options-menu][I want to use gptel in a way that's not supported by =gptel-send= or the options menu]]
- [[#doom-emacs-sending-a-query-from-the-gptel-menu-fails-because-of-a-key-conflict-with-org-mode][(Doom Emacs) Sending a query from the gptel menu fails because of a key conflict with Org mode]]
- [[#why-another-llm-client][Why another LLM client?]]
Expand Down Expand Up @@ -419,6 +420,34 @@ For dedicated chat buffers: customize =gptel-prompt-prefix-alist= and =gptel-res

Anywhere in Emacs: Use =gptel-pre-response-hook= and =gptel-post-response-functions=, which see.

#+html: </details>
#+html: <details><summary>
**** I want the transient menu options to be saved so I only need to set them once
#+html: </summary>

Any model options you set are saved for the current buffer. But the redirection options in the menu are set for the next query only:

https://github-production-user-asset-6210df.s3.amazonaws.com/8607532/298437596-2ecc6be9-aa52-4287-a739-ba06e1369ec2.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240122%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240122T024547Z&X-Amz-Expires=300&X-Amz-Signature=1de4883203dcb1cf2d203f11cb3d64ec84e6584690673b9306256a4d659ff23f&X-Amz-SignedHeaders=host&actor_id=8607532&key_id=0&repo_id=610038902

# https://github.com/karthink/gptel/assets/8607532/2ecc6be9-aa52-4287-a739-ba06e1369ec2.png

You can make them persistent across this Emacs session by pressing ~C-x C-s~:

https://github-production-user-asset-6210df.s3.amazonaws.com/8607532/298438187-b8bcb6ad-c974-41e1-9336-fdba0098a2fe.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240122%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240122T024619Z&X-Amz-Expires=300&X-Amz-Signature=1f594b00fa4822cd92948af30f2de10d04bf5a7000d97bc2af22c9512272726b&X-Amz-SignedHeaders=host&actor_id=8607532&key_id=0&repo_id=610038902

# https://github.com/karthink/gptel/assets/8607532/b8bcb6ad-c974-41e1-9336-fdba0098a2fe

(You can also cycle through presets you've saved with ~C-x p~ and ~C-x n~.)

Now these will be enabled whenever you send a query from the transient menu. If you want to use these options without invoking the transient menu, you can use a keyboard macro:

#+begin_src emacs-lisp
;; Replace with your key to invoke the transient menu:
(keymap-global-set "<f6>" "C-u C-c <return> <return>")
#+end_src

See [[https://github.com/karthink/gptel/issues/94#issuecomment-1657093458][this comment by Tianshu Wang]] for an Elisp solution.

#+html: </details>
#+html: <details><summary>
**** I want to use gptel in a way that's not supported by =gptel-send= or the options menu
Expand Down

0 comments on commit 43e0a12

Please sign in to comment.