joshcho / ChatGPT.el

ChatGPT in Emacs
GNU General Public License v3.0
397 stars 34 forks source link

breaking fix of chatgpt.py to ApiBackend from ChatCPT #53

Closed andorsk closed 1 year ago

andorsk commented 1 year ago

The API to the chatgpt_wrapper has changed:

https://github.com/mmabrouk/chatgpt-wrapper#python

https://github.com/mmabrouk/chatgpt-wrapper/blob/593cd6f832b92eaf3332630c825c17d7a0510902/lwe/backends/api/backend.py#L25

When I tried installing this it failed to work because I would get the response:

epc:start-server: Server may raise an error. Use "M-x epc:pop-to-last-server-process-buffer RET" to see full traceback:
Traceback (most recent call last):
  File "/Users/akmb2/.emacs.d/.local/straight/repos/ChatGPT.el/chatgpt.py", line 4, in <module>
    from chatgpt_wrapper import ChatGPT
ModuleNotFoundError: No module named 'chatgpt_wrapper'

After some debugging, I determined that APIBackend is the suggested method to use ChatGPT for the updated package. I do not know when this was changed.

I remove some of the previous checks because the import will fail if there is an old chatgpt_wrapper version.

andorsk commented 1 year ago

seems related to : https://github.com/joshcho/ChatGPT.el/pull/52