Extra functions for gptel, a package that allows you to use various LLM providers for text generation and completion directly from Emacs.
Jump to the bottom of the buffer and then send the entire buffer.
Load the current buffer into a session so you can ask questions about it.
Accept a prompt in the minibuffer and pop up a window with the response. Extracted from the Wiki.
Rewrite the region or sentence at point and replace it with the response. Extracted from the Wiki.
Refactor the region or sentence at point.
The hook gptel-ext-clean-up-gptel-refactored-code was taken from the wiki and added. It automatically cleans up code snippets returned from the LLM.
Prefix to use when asking questions about a document. Defaults to:
Your task is to answer questions about the following document. If you don't know the answer, reply with "I don't know" ###### DOCUMENT START ######
Suffix to use when asking questions about a document. Defaults to:
###### DOCUMENT END ###### ### Question:
Directive to use when refactoring code. Defaults to:
You are a programmer. Refactor my code to improve readability. Reply only with the code.
Directive to use when calling gptel-ext-rewrite-and-replace. Defaults to:
You are a programmer. Re-write this code.
This merely extends the amazing gptel by Karthik Chikmagalur, who performed all the hard work.
This package is a fork of gptel-extensions by kamushadenes.