dangom / aide.el

An Emacs front end for GPT APIs like OpenAI

Home Page:https://emacstil.com/til/2021/12/28/playing-with-openai/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aide.el

An Emacs front end for GPT APIs like OpenAI.

Note: This is still alpha software. Use with caution.

Demo

aide.ei-demo

Installation

Dependency: aide.el depends on emacs-request package.

I haven't uploaded aide.el to any package repo yet (e.g., MELPA), so you have to install manually for now:

Copy the content of aide.el to Emacs and evaluate it.

Usage

Prerequisite:

(setq openai-api-key "<api-key>")

Then you can select any region and run M-x aide-openai-completion-region-insert.

You can also run M-x aide-openai-completion-buffer-insert, which grabs the current buffer as a string, send it to OpenAI API and insert the result at the end of the buffer. This is like the OpenAI playground where you can run the command multiple times to continue the conversion in the same buffer.

Note: This command reads th ENTIRE buffer.

Custom variables

You can set the custom variables to control the aide.el behavior.

To do so, you can M-x customize, select External > aide.

Or you can set it directly in elisp:

(setq aide-max-tokens 200)

License

See aide.el.

About

An Emacs front end for GPT APIs like OpenAI

https://emacstil.com/til/2021/12/28/playing-with-openai/


Languages

Language:Emacs Lisp 100.0%