diff options
| author | Craig Jennings <craigmartinjennings@gmail.com> | 2024-04-11 01:39:11 -0500 |
|---|---|---|
| committer | Craig Jennings <craigmartinjennings@gmail.com> | 2024-04-11 01:39:11 -0500 |
| commit | 07fd4f1a6930dc62880b0fd7a0496270f4c2efd6 (patch) | |
| tree | 31c37427859b391dd8dcad9abc2f4f3515f072b5 /modules/ai-config.el | |
| parent | a55a5248bd2dae5f849476d0f7b5dcd8d91cf929 (diff) | |
more fit and finish work
User Constants
- move all file and directory constants into it's own file
- create the directories and files if they don't exist
- warn the user when not found/created
General
- remove duplicate dirvish go menu entry
- remove xterm color in test code (it's already in eshell)
- fixed org-drill not starting
- fixing issue with auto-complete not working in eshell
- adding playlists location for dirvish
- moved all org-drill config into the use-package declaration
- added drill-dir to user-constants
- default ledger-file location changed; updated tasks
- git ignore the persist folder
- added more point values in fontaine menu
- fix for gptel early key grab in authinfo.gpg
- removed localrepo from reset script
- remove magit-forge package
- don't wait too long to bury-buffers
- add setting native compile warnings to 'silent
- fixed sdcv errors when looking up a word normally and in nov
Diffstat (limited to 'modules/ai-config.el')
| -rw-r--r-- | modules/ai-config.el | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/modules/ai-config.el b/modules/ai-config.el index 2240d0ac..be4cffa9 100644 --- a/modules/ai-config.el +++ b/modules/ai-config.el @@ -23,7 +23,8 @@ ;; integration with ChatGPT and other large language models. (use-package gptel - :defer .5 + :defer t + :commands (gptel gptel-send) :bind ("C-h G" . gptel) (:map gptel-mode-map @@ -34,33 +35,22 @@ (gptel-default-mode 'org-mode) :config (setq gptel-directives - '((default - . "You are a large language model living in Emacs and a careful and + '((default + . "You are a large language model living in Emacs and a careful and knowledgeable emacs-lisp programmer. Respond accurately and concisely.") - (programming - . "You are a large language model and a careful programmer. Provide code + (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 + (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 + (chat + . "You are a large language model and a conversation partner. Respond concisely."))) ;; grab the secret from ~/.authinfo.gpg + (setq auth-sources '((:source "~/.authinfo.gpg"))) (setq gptel-api-key (auth-source-pick-first-password :host "api.openai.com"))) -;; ----------------------------- Gptel Send Region ----------------------------- -;; convenience function to send a selection to Gptel. - -(defun cj/gptel-send-region (&optional prefix) - "Verify a region is selected and call gptel-send with PREFIX." - (interactive "P") - (if (use-region-p) - (gptel-send (prefix-numeric-value prefix)) - (error "No region selected"))) - -(global-set-key (kbd "C-; g") 'cj/gptel-send-region) - (provide 'ai-config) ;;; ai-config.el ends here |
