From 8d7dec78f54810f6fabe67034639a41ce71a3255 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Wed, 24 Jul 2024 16:09:16 -0400 Subject: [PATCH] Add shell command directive to gptel configuration This change introduces a new directive for generating shell commands to the gptel configuration. The directive specifies that the response should be plain text with no additional description or formatting. --- emacs/.emacs.d/config/init-ai.el | 1 + 1 file changed, 1 insertion(+) diff --git a/emacs/.emacs.d/config/init-ai.el b/emacs/.emacs.d/config/init-ai.el index 7b9e477..07db5b6 100644 --- a/emacs/.emacs.d/config/init-ai.el +++ b/emacs/.emacs.d/config/init-ai.el @@ -29,6 +29,7 @@ models-alist))))) (setq gptel-backend (car backend) gptel-model (cadr backend)))) + (add-to-list 'gptel-directives '(shell-command . "You are a command line helper. Generate shell commands that do what is requested, without any additional description or explanation. Reply in plain text with no Markdown or other syntax. Reply with the command only.")) :general ("C-c RET" #'gptel-send "C-c C-" #'gptel-menu)