3/31/2025 at 7:05:39 PM
GPTel is a very powerful interface for working with LLMs in Emacs. It took me a while to understand that its real value isn't what you get with M-x gptel, which creates a dedicated chat session and buffer, but rather the ability to sling prompts, context, and LLM output around in a native Emacs way. You can add to the context from dired, from a file, from a buffer, you can select from various prescribed system prompts for different functionality, you can prompt from the minibuffer, the kill-ring, the existing buffer, a selection, you can have the responses go to the minibuffer, the kill-ring, a buffer, the echo area -- it's extremely flexible.I have a little helper function that uses gptel-request that I use while reading Latin texts. It sets the system prompt so the LLM acts as either a Latin to English translator, or with a prefix argument it breaks down the grammatical structure and vocabulary of a sentence for me. It's very cool.
by spudlyo
4/1/2025 at 4:11:55 AM
How did you get started? Was it mostly plug-and-play or was some nontrivial hacking involved? I use emacs and I normally wouldn't mind shaving a yak or two, but right now I'm swamped with work and I'm kinda scared of getting sucked into a rabbit hole.by C-x_C-f
4/1/2025 at 4:46:36 AM
gptel is mostly plug-and-play. The docs offer a comprehensive overview: https://github.com/karthink/gptelby dskhatri