Every LLM in Emacs, with gptel
HTML-код
- Опубликовано: 25 июл 2024
- GPTel is a simple LLM client for Emacs. It's always available but stays out of your way.
It supports ChatGPT/Azure, Ollama, Gemini, Kagi and more.
You can install it from MELPA. For more information: github.com/karthink/gptel
00:00 The pitch
00:27 Installation and basic usage
04:00 Fun with LLM system messages
04:27 Example: GPT-4 as a scientific calculator
05:47 Example: GPT-4 as a thesaurus
07:07 gptel's design
07:55 Redirecting input and output
08:04 Example: Redirect both to the minibuffer
08:32 Example: Redirect and continue a conversation
10:37 Design objective: be invisible, but always available
11:04 Example: Fixing LaTeX in-place
12:08 Example: A just-in-time shell commands
13:09 Example: just-in-time Emacs discovery
13:38 Design objective: a small surface area
13:57 Two kinds of consistency: external and internal interface
14:13 Example: Multi-LLM demo
15:53 Design objective: Focus on text
16:46 Commonly requested behaviors, gptel-request
17:47 Sign-off
Since I always get questions about the visuals:
Emacs theme: modus-operandi
Fonts: Iosevka Comfy Motion (monospace), Merriweather (Serif)
Other packages used: spacious-padding, olivetti, popper Наука
One word - humbling.
Fantastic. A brilliant example of what makes Emacs so powerful.
Very impressive!
My mind is literally boggled! :)
Thank you for sharing this video
Thank you! I just installed gptel and use it in the last weekend, really appreciate the work.
Amazing work! Thank you
It works way better than I expected. Great work!
Just wanted to say, this package is amazing. Thank you for creating it and this video. I was using the package prior, but with this video I feel like its usage will be even better!
Tremendous work with an entertaining video tooc Can't wait to try it!
wow! Amazing work!
You always surprises me!
Much appreciated... great stuff (y)
Thanks for this great package!
LLMs are not my cup of tea, but still I just had to comment and commend you on yet another stellar combo of package and video demo! Honestly awe inspiring stuff! :)
great!
I continue to be impressed with this package. I am attempting to replicate your session. How do you get to mark-down mode around 2:13? Do you have this set as a default when addressing Gemini? Would you mind showing us your config specific settings for this demo?
I changed gptel-default-mode from Org to Markdown. To not overwhelm the viewer with too much detail, I wrote a helper function to do it silently and bound it to a key, then called it before opening the Gemini chat buffer.
I already had Ollama installed, and now I have it inside Emacs. BTW; i added some directives:
(add-to-list 'gptel-directives '(english . "Translate the following to english:"))
(add-to-list 'gptel-directives '(deutsch . "Translate the following to german:"))
(add-to-list 'gptel-directives '(typo . "Fix typos, grammar and style of the following:"))
However, I feel that the "h" submenu of gptel-menu is quite obnoxious. Do I really have to Ctrl-G (usually a hard quite, abort) to get out of it? Why not let me get out via ESC or RET? I mean, even when I press one of these texts, it says "Use 'C-g' to abort. But I expect "abort" to not change the prompt, but keep it as-is. And that there exists some way to just set the prompt.
It should automatically take you back once you select a directive. Looks like you're experiencing a bug, see github.com/karthink/gptel/issues/140.
Hi there, could you tell me what font that is? Thank you.
I added it to the video description.
i think i tried it on windows some time ago and it didnt work so i gave up (something about curl)
14:24 Did you implement the Kagi FastGPT with gptel? I cannot find it in gptel, is there any plan to add it to gptel? Thanks
It's on the kagi-fastgpt branch, not merged into master yet. You can try it from there, the README will have the setup instructions.
@@karthinkOk, will try tomorrow. Happy New Year!
@@karthink Cool, it works as expected. I'll see if I can add Kagi Universal Summarizer to gptel, my use case is to summarize articles in elfeed.
@@goofansu There is some discussion about this in github.com/karthink/gptel/issues/166
A happy new year to you as well!
9:39 The org-mode buffer seems live rendered, how do you do that?
tinyurl.com/ms2ksthc It's part of a rewrite of Org's LaTeX preview system, see my previous video for more details.
@@karthink Cool, thank you!
The very first crime you committed was not using dark mode. It’s against the law