Skip to content

aserranoni/gpt-chat-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Readme

Intro

This is an unofficial wrapper for the openAI API written in emacs lisp. It exposes the start-chatting function which opens a chat buffer with the text-davinci-003 model.

Usage

If you want to try this code out for yourself, the best way to do it right now is to download the code files and run (load "path/to/file") on some elisp REPL or even add this line to your config. You are also required to have a file containing your API key and adjust the openai-key-file variable accordingly.

How the code works

The code on this repo is actually really simple. It formats all the required data for the request, sends your message as the prompt to the openAI model and formats the response. The fontend is displayed a Lui-type buffer. Right now, this is the only functionality that is fully implemented but you can actually call any endpoint using the make-api-request function (of course, adapting the url and more importantly the data JSON format).

Going further and contributing

The openAI API opens up a whole miriad of possibilities and there is no fixed roadmap for this code, so feel free to implement whatever features you find useful/interesting.

Other similar initiatives

While I was writing this code, I stumbled upon other cool projects doing similar things with elisp. Shoutout to Josh Cho and Gavinok

License

All the code from this repo is free to use, modify, reproduce, or whatever.

About

Just another ChatGPT emacs openai API wrapper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published