Link: Engineering AI

;; Copilot (use-package copilot :ensure t :quelpa (copilot :fetcher github :repo “copilot-emacs/copilot.el” :branch “main” :files (“*.el”)) :init (global-copilot-mode) (define-key copilot-completion-map (kbd “<backtab>”) ‘copilot-accept-completion))

(use-package gptel :ensure t :config (setq gptel-api-key (getenv “OPENAI_API_KEY”)) (gptel-make-ollama “Ollama” :host “localhost:11434” :stream t :models ’(“llama2:latest”)))

“ai” ’(:ignore t :which-key “AI”) “ai>” ‘(gptel-send :which-key “Send Line”) “aig” ‘(gptel :which-key “GPT Buffer”) “aim” ‘(gptel-menu :which-key “GPT Menu”) “air” ‘(gptel-rewrite :which-key “Rewrite”) “ai+” ‘(gptel-add :which-key “Add”) “ai!” ‘(gptel-add-file :which-key “Add File”) “ain” ‘(gptel—rewrite-next :which-key “Rewrite Next”) “aip” ‘(gptel—rewrite-previous :which-key “Rewrite Previous”)