karthink / gptel

A simple LLM client for Emacs
GNU General Public License v3.0
1.04k stars 113 forks source link

No 'gptel-api-key' found in the auth source when using GPT4All #122

Closed nickanderson closed 8 months ago

nickanderson commented 8 months ago

I occasionally get a message No 'gptel-api-key' found in the auth source even though I am only using GPT4All.

  (gptel-make-gpt4all
   "GPT4All"                              ;Name of your choosing
   :protocol "http"
   :host "localhost:4891"                 ;Where it's running
   :models '( "mistral-7b-instruct-v0.1.Q4_0.gguf"
              "mistral-7b-openorca.Q4_K_M.gguf"
              )) ;Available models
  ;; (setq gptel-model "mistral-7b-instruct-v0.1.Q4_0.gguf")
  (setq gptel-model "mistral-7b-openorca.Q4_K_M.gguf")
  (setq-default gptel-max-tokens 800)
  (setq gptel-directives   '((default . "You are a Nexus, Nick Anderson's helpful assistant. You have dry humor.")
                            (programming . "You are a large language model and a careful programmer. Provide code and only code as output without any additional text, prompt or note.")
                            (writing . "You are a large language model and a writing assistant. Respond concisely.")
                            (chat . "You are a large language model and a conversation partner. Respond concisely.")))

I see the message when I run gptel-send. While it doesn't always do it, once it starts it does not seem to stop until I switch models.

karthink commented 8 months ago

Are you using gptel in a dedicated buffer (with M-x gptel) or in regular buffers?

nickanderson commented 8 months ago

Regular buffers.

karthink commented 8 months ago

Set the default value of gptel-model instead, with

(setq-default gptel-model "mistral-7b-openorca.Q4_K_M.gguf")

Let me know if the bug persists?

(Additionally, there is an issue with API key entry prompts in dedicated buffers that I'll fix soon. This shouldn't be affecting you.)

nickanderson commented 8 months ago

Ok, I'll give that a shot and report back.

Thanks.

nickanderson commented 8 months ago

I have not seen this since using setq-default to set the gptel-model, so I will close this for now and re-open if I see it again.