Files
doomemacs/modules/tools/llm
Henrik Lissner 6898a9c267 module: add :tools llm
Clippy is making a comeback.

Close: #7231
2025-05-06 22:30:49 -04:00
..
2025-05-06 22:30:49 -04:00
2025-05-06 22:30:49 -04:00
2025-05-06 22:30:49 -04:00

:tools llm

Description   unfold

This module integrates LLMs into Emacs for analyzing or generating code and text, powered by the gptel package. Out of the box, ChatGPT is the default backend, but it can talk to other LLMs given some configuration.

Module flags

This module has no flags.

Hacks

󱌣 This module's hacks haven't been documented yet. Document them?

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

An OpenAI API key, paid account, and enough credits to use it is required (if you use the OpenAI backend). To use this module with other LLMs, visit the Configuration section.

Usage

󱌣 This module's usage documentation is incomplete. Complete it?

Check out gptel's usage documentation for details on how to use the package.

Doom exposes these keybinds for gptel's commands:

Keybind Command Description
<leader> o l a cmd:gptel-add Add text to LLM context
<leader> o l e cmd:gptel-quick Explain item or selection
<leader> o l f cmd:gptel-add-file Add file to LLM context
<leader> o l l cmd:gptel Open gptel chat buffer
<leader> o l s cmd:gptel-send Send text before (point) (or selection)
<leader> o l m cmd:gptel-menu Open configuration menu for gptel
<leader> o l r cmd:gptel-rewrite Rewrite, refactor, or change the selected region
<leader> o l o cmd:gptel-org-set-topic Limit context to Org heading
<leader> o l O cmd:gptel-org-set-properties Store gptel config as org properties

This module also adds a "pre-generated message" option to magit-commit's transient menu. Alternatively, press M-g to generate a message in a commit buffer.

Configuration

󱌣 This module's configuration documentation is incomplete. Complete it?

To use this module with only ChatGPT, you only need to set gptel-api-key to your OpenAI key. For other LLMs you'll need to call one of the gptel-make-* functions in an (after! gptel ...) block. Examples of these calls can be found in gptel's readme.

Troubleshooting

There are no known problems with this module. Report one?

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

󱌣 This module has no appendix yet. Write one?