Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

kamushadenes/gptel-extensions.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gptel-extensions

Extra functions for gptel, a package that allows you to use OpenAI's GPT for text generation and completion directly from Emacs.

Installation

  1. Clone the repository to a local directory with:

    git clone https://github.com/kamushadenes/gptel-extensions.el.git
    
  2. Add the following to your Emacs init file (usually ~/.emacs or ~/.emacs.d/init.el):

    (add-to-list 'load-path "path/to/gptel-extensions")
    (require 'gptel-extensions)
    

    Replace path/to/gptel-extensions with the path where you cloned the repository.

  3. Restart Emacs, or evaluate the added code with M-x eval-buffer while in the init file.

Functions

gptel-extensions-send-whole-buffer

Send the whole buffer to ChatGPT.

gptel-extensions-ask-document

Load the current buffer into a session so you can ask questions about it.

gptel-extensions-rewrite-and-replace

Rewrite the region or sentence at point and replace it with the response. Extracted from the Wiki.

gptel-extensions-refactor

Refactor the region or sentence at point.

Variables

gptel-extensions-ask-document-prefix

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 ######

gptel-extensions-ask-document-suffix

Suffix to use when asking questions about a document. Defaults to:


###### DOCUMENT END ######

### Question: 

gptel-extensions-refactor-directive

Directive to use when refactoring code. Defaults to:

You are a programmer. Refactor my code to improve readability. Reply only with the code.

Credits

This merely extends the amazing gptel by Karthik Chikmagalur, who performed all the hard work.

About

Extra functions for gptel

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •