karthink / gptel

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

Meta Information Insertion #437

Closed kantholtz closed 4 weeks ago

kantholtz commented 1 month ago

Hey! Thank you very much for the great mode. I enjoy using it very much. However, I have questions regarding the automatic insertion of model and prompt information: I have gptel activate automatically for every text-mode and as such, it is nearly always active (I've appended my small config). Now if I, for example, create a new file test.txt, it automatically inserts the full meta information block upon saving. Even after deactivating the gptel-mode, this meta information block is written upon saving.

Thanks!

Additional context Emacs version: GNU Emacs 29.4 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-07-08GNU Emacs 29.4 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-07-08 Operating system: Linux 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Initialization Config:

(use-package gptel :hook (text-mode . gptel-mode))
karthink commented 1 month ago

Even after deactivating the gptel-mode, this meta information block is written upon saving.

This is not the case. You're on an older commit, please update gptel.

Or better: Is it possible to only write the meta information if there is generated text in the file (i.e. gptel--bounds are not nil)

You don't need to turn on gptel-mode, you can chat in any buffer. You can turn on gptel-mode and save the file if you decide you want to preserve the conversation state.

kantholtz commented 4 weeks ago

Understood, thanks :)