Skip to content

bx-blee/chatGptInv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OBSOLETED – This Repo Is Kept For Historic Purposes. Don’t Use It.

By Now, <2025-05-14 Wed 19:47> , gptel and aidermacs are so advanced that what is in here is irrelevant.

I have moved the little bit of useful that remains relevant to:

https://github.com/bx-blee/aiplus

ChatGPT Invoker Emacs interface

ChatGPT is awsome and there has been and there will be more emacs packages that provide interfaces to it.

In February of 2023, I, Mohsen BANAN, tried to get something working for myself. What I ended up with is a temporary solution that lets me use ChatGPT in a very basic way. For now it is just a bandaid and it is not clean.

Over the next several months I expect that much cleaner emacs packages will be produced. At which time, I’ll switch.

Here is a summary of my journey.

This packaging has only been tested with Blee.

In order to have it work with vanila emacs or Doom or etc, you may have to modify various things and you are on your own for that.

List Of Existing ChatGPT Invoker Emacs interfaces

As of Feb 2023, the following packages were located.

https://github.com/joshcho/ChatGPT.el — With Python chatgpt-wrapper

I pip installed the python side and got the python chatgpt to work.

The elisp interface to epc, did not work for me. It just hung.

For integration of service invokers into emacs, I like the external python approach best. So, I will likely be coming back to this later.

Tried that and it did not work for me.

It worked for me. But it was not packaged and like the other two did not have a a menu. So, I have packaged it here and have added a menu to it as well.

The ./chatgpt.el i sessentially a copy of Gavin’s. Here are the things that I added:

  • The end result buffer is now subjected to a fill-region
  • There is top level menu, that makes it easier to use.

Package installation

Blee Installation

(b:pkg:straight|profiledInstall
   b:pkgsProfile:native
 '(chatGptInv :type git :host github :repo "bx-blee/chatGptInv"))))

Straight Installation

(use-package chatGptInv
  :straight (:host github :repo "bx-blee/chatGptInv"))

But, I have not tested it. It may not work.

🔑 Obtaining API key

To use this extension, you will need an API key from OpenAI. To obtain one, follow these steps:

  1. Go to https://beta.openai.com/account/api-keys If you

don’t have an account, you will need to create one or sign up using your Google or Microsoft account.

  1. Click on the `Create new secret key` button.
  2. Copy the key and paste into the ‘API Key’ field under the ‘openai’ custom group settings.
  3. export OPENAI_API_KEY=”theKeyGoesHere”

When you create a new account, you receive $18 in free credits for the API which you must use in the first 90 days. You can see pricing information https://openai.com/api/pricing/. 1000 tokens are about 700 words, and you can see the token count for each request at the end of the response in the sidebar.

About

Chat GPT Invoker Through Emacs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published