karthink / gptel

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

Configuration of default mode not respected #124

Closed DanTheDane closed 8 months ago

DanTheDane commented 8 months ago

I have the following in my configuration (api masked out)

(use-package gptel :config (setq gptel-api-key "xxxxxxxx") (setq gptel-default-mode 'org-mode) (setq gptel-model "gpt-4") )

However when I run "gptel" it always defaults to gpt-3.5-turbo: GPTel

The general configuration is working as the api key is picked up, and queries are successful

karthink commented 8 months ago

gptel-model is a buffer-local variable, you need to set its default value. Use setopt, setq-default or the customize interface instead of setq.

DanTheDane commented 8 months ago

Doh! Thank you, didn't think of that.

It works well with setq-default :-)