diff options
author | azahi <azat@bahawi.net> | 2024-11-10 01:08:38 +0300 |
---|---|---|
committer | azahi <azat@bahawi.net> | 2024-11-10 01:08:38 +0300 |
commit | 693768ee37098dbebb38c86e27044f2faa38348d (patch) | |
tree | 37c92a1c83cf22fa5e5a570baa8598ba6063c795 /modules/emacs | |
parent | 2024-10-29 (diff) |
2024-11-10
Diffstat (limited to 'modules/emacs')
-rw-r--r-- | modules/emacs/doom/config.el | 102 | ||||
-rw-r--r-- | modules/emacs/doom/init.el | 2 | ||||
-rw-r--r-- | modules/emacs/doom/packages.el | 4 |
3 files changed, 107 insertions, 1 deletions
diff --git a/modules/emacs/doom/config.el b/modules/emacs/doom/config.el index 85fe4a9..464a8b2 100644 --- a/modules/emacs/doom/config.el +++ b/modules/emacs/doom/config.el @@ -260,3 +260,105 @@ (setq-local company-idle-delay 0.1)))) :init (setq! hledger-input-buffer-height 20)) + +;; +;;; LLM +;; + +(use-package! gptel + :config + (setq! gptel-model 'codegemma:7b + gptel-backend (gptel-make-ollama "ollama" + :host "eonwe.shire.net:11434" + :stream t + :models '(mistral:7b + codegemma:7b + codellama:7b + deepseek-coder-v2:16b + llama3.2:3b)))) + +(use-package! ellama + :init + (setq! ellama-naming-scheme 'ellama-generate-name-by-time) + :config + (require 'llm-ollama) + (setq! ellama-provider (make-llm-ollama + :scheme "http" + :host "eonwe.shire.net" + :port 11434 + :chat-model "llama3.2:3b" + :embedding-model "nomic-embed-text:latest") + ellama-providers '(("llama" . (make-llm-ollama + :scheme "http" + :host "eonwe.shire.net" + :port 11434 + :chat-model "llama3.2:3b" + :embedding-model "nomic-embed-text:latest")) + ("codellama" . (make-llm-ollama + :scheme "http" + :host "eonwe.shire.net" + :port 11434 + :chat-model "codellama:7b" + :embedding-model "nomic-embed-text:latest")) + ("qwen" . (make-llm-ollama + :scheme "http" + :host "eonwe.shire.net" + :port 11434 + :chat-model "qwen2.5:7b" + :embedding-model "nomic-embed-text:latest")) + ("gemma" . (make-llm-ollama + :scheme "http" + :host "eonwe.shire.net" + :port 11434 + :chat-model "gemma2:9b" + :embedding-model "nomic-embed-text:latest")) + ("codegemma" . (make-llm-ollama + :scheme "http" + :host "eonwe.shire.net" + :port 11434 + :chat-model "codegemma:7b" + :embedding-model "nomic-embed-text:latest")) + ("mistral" . (make-llm-ollama + :scheme "http" + :host "eonwe.shire.net" + :port 11434 + :chat-model "mistral:7b" + :embedding-model "nomic-embed-text:latest")) + ("hermes" . (make-llm-ollama + :scheme "http" + :host "eonwe.shire.net" + :port 11434 + :chat-model "hermes3:8b" + :embedding-model "nomic-embed-text:latest")) + ("deepseek" . (make-llm-ollama + :scheme "http" + :host "eonwe.shire.net" + :port 11434 + :chat-model "deepseek-coder-v2:16b" + :embedding-model "nomic-embed-text:latest"))) + ellama-translation-provider (make-llm-ollama + :scheme "http" + :host "eonwe.shire.net" + :port 11434 + :chat-model "qwen2.5:7b" + :embedding-model "nomic-embed-text:latest") + ellama-summarization-provider (make-llm-ollama + :scheme "http" + :host "eonwe.shire.net" + :port 11434 + :chat-model "mistral:7b" + :embedding-model "nomic-embed-text:latest"))) + +(use-package! magit-gptcommit + :after magit + :config + (require 'llm-ollama) + (setq! magit-gptcommit-llm-provider (make-llm-ollama + :scheme "http" + :host "eonwe.shire.net" + :port 11434 + :chat-model "llama3.2:3b" + :embedding-model "nomic-embed-text:latest")) + + + (magit-gptcommit-status-buffer-setup)) diff --git a/modules/emacs/doom/init.el b/modules/emacs/doom/init.el index 8575c3f..3845fd6 100644 --- a/modules/emacs/doom/init.el +++ b/modules/emacs/doom/init.el @@ -48,7 +48,7 @@ :checkers syntax - (spell +everywhere +icons) + (spell +flyspell +everywhere +icons) grammar :tools diff --git a/modules/emacs/doom/packages.el b/modules/emacs/doom/packages.el index fb521bc..8fb24f4 100644 --- a/modules/emacs/doom/packages.el +++ b/modules/emacs/doom/packages.el @@ -21,6 +21,10 @@ :recipe (:host gitlab :repo "emacs-ansible/emacs-ansible")) +(package! gptel) +(package! ellama) +(package! magit-gptcommit) + ;; (package! tvl ;; :recipe (:host nil ;; :repo "https://code.tvl.fyi/depot.git:/tools/emacs-pkgs/tvl.git" |