Closed arademaker closed 1 year ago
Emacs don't show the marks <shell-maker-end-of-prompt>
and <shell-maker-failed-command>
Try (setq shell-maker-logging t)
and share the logs.
Now it seems to be waiting response, but nothing happens
// Request
curl https://api.openai.com/v1/chat/completions --fail-with-body --no-progress-meter -m 180 -H Content-Type: application/json -H Authorization: Bearer nil -d {"stream":true,"model":"gpt-3.5-turbo","messages":[{"role":"system","content":"Always show code snippets in markdown blocks with language labels."},{"role":"user","content":"Alex"}]}
Try to run that command from a terminal and see if that succeeds
-H Authorization: Bearer nil
The key is missing.
It should looks like: -H Authorization: Bearer SK-REDACTED-OPENAI-KEY
Ensure (auth-source-pass-get 'secret "...")
returns the key.
OK, I misunderstood the README. I edited my init.el
file:
(setq chatgpt-shell-openai-key
"MY_KEY_HERE"). <= here I copied my key from open
(use-package chatgpt-shell
:ensure t
:custom
((chatgpt-shell-openai-key
(lambda ()
(auth-source-pass-get 'secret "openai-key")))))
In the use-package, the call to auth-source-pass-get
should pass the literal string "openai-key"
, right? After that, the call to auth-source-pass-get
still returns nil.
(auth-source-pass-get 'secret "openai-key") => nil
OK, my mistake... sorry. Now working:
(use-package chatgpt-shell
:ensure t
:custom
((chatgpt-shell-openai-key "MY-KEY-HERE"))
So silly, I didn't pay attention properly. Now working.
Emacs 28.2 from http://emacsformacosx.com running on MacOS 13.3.1. I have in my .init.el
I started with
chatgpt-shell
But I got no output