diff --git a/init.org b/init.org index 6e0e19d..4457104 100644 --- a/init.org +++ b/init.org @@ -3965,19 +3965,29 @@ Visual undo history navigation. #+end_src ** AI -*** ellama +*** gptel #+begin_src emacs-lisp :tangle yes -(use-package ellama +(use-package gptel :ensure t :functions - (make-llm-ollama) - :bind-keymap - ("C-, e" . ellama-command-map) + (gptel-make-ollama) + :bind + ((:map leader-map + ("g" . gptel-menu) + ("G" . gptel))) :config - (setq ellama-auto-scroll t) - (setq ellama-provider - (make-llm-ollama :chat-model "llama3.1" - :embedding-model "llama3.1"))) + (setq gptel-model "llama3.1:latest") + (setq gptel-backend (gptel-make-ollama "Ollama" + :host "localhost:11434" + :stream t + :models '("llama3.1:latest" + "gemma2:latest"))) + (setq gptel-default-mode 'org-mode) + + (cl-pushnew + '(cli . "You are a large language model and a correct command line helper. Provide commands and only commands as output without any additional text, prompt or note.") + gptel-directives + :test #'equal)) #+end_src * Testing diff --git a/lock/flake.lock b/lock/flake.lock index 283eb71..e0c6bc5 100644 --- a/lock/flake.lock +++ b/lock/flake.lock @@ -576,22 +576,6 @@ "type": "github" } }, - "ellama": { - "flake": false, - "locked": { - "lastModified": 1721561925, - "narHash": "sha256-9MPQ/4tI88Jpd6u/7EgyWNiBPmY3uLjA99ggaf025Yo=", - "owner": "s-kostyaev", - "repo": "ellama", - "rev": "8270e71c335b1656384e6c1b9d61c2a7ecc65bbb", - "type": "github" - }, - "original": { - "owner": "s-kostyaev", - "repo": "ellama", - "type": "github" - } - }, "elm-mode": { "flake": false, "locked": { @@ -960,6 +944,22 @@ "type": "github" } }, + "gptel": { + "flake": false, + "locked": { + "lastModified": 1725254672, + "narHash": "sha256-77Ki7ST6bTNyP1BZnyQRwuza3bcND9qKQ2qSN6aD4wA=", + "owner": "karthink", + "repo": "gptel", + "rev": "87dfb2d1de3909e6471666d7009643d7c309a93b", + "type": "github" + }, + "original": { + "owner": "karthink", + "repo": "gptel", + "type": "github" + } + }, "gradle-mode": { "flake": false, "locked": { @@ -1360,22 +1360,6 @@ "type": "github" } }, - "llm": { - "flake": false, - "locked": { - "lastModified": 1722733831, - "narHash": "sha256-B1wz2xb2HreoIwQtrEPA5bbXHAsCQCke7wJretS54bA=", - "owner": "ahyatt", - "repo": "llm", - "rev": "806a703b91580c1c34d3bb5fe1d556b659f89bcf", - "type": "github" - }, - "original": { - "owner": "ahyatt", - "repo": "llm", - "type": "github" - } - }, "log4e": { "flake": false, "locked": { @@ -1888,23 +1872,6 @@ "type": "github" } }, - "plz": { - "flake": false, - "locked": { - "lastModified": 1718047390, - "narHash": "sha256-mF0gNQJ1StIpkcoHxYy/cImdDvFfjOAd5GSjC6HUdLg=", - "owner": "alphapapa", - "repo": "plz.el", - "rev": "df44acec4baf9ae1f2d56ff1e40fada32681a097", - "type": "github" - }, - "original": { - "owner": "alphapapa", - "ref": "stable", - "repo": "plz.el", - "type": "github" - } - }, "pomm": { "flake": false, "locked": { @@ -2167,7 +2134,6 @@ "easy-escape": "easy-escape", "edit-indirect": "edit-indirect", "elisp-refs": "elisp-refs", - "ellama": "ellama", "elm-mode": "elm-mode", "elquery": "elquery", "embark": "embark", @@ -2191,6 +2157,7 @@ "gorepl-mode": "gorepl-mode", "gotest": "gotest", "goto-chg": "goto-chg", + "gptel": "gptel", "gradle-mode": "gradle-mode", "groovy-mode": "groovy-mode", "grugru": "grugru", @@ -2216,7 +2183,6 @@ "kv": "kv", "ligature": "ligature", "link-hint": "link-hint", - "llm": "llm", "log4e": "log4e", "lv": "lv", "magit": "magit", @@ -2249,7 +2215,6 @@ "parseclj": "parseclj", "parseedn": "parseedn", "pdf-tools": "pdf-tools", - "plz": "plz", "pomm": "pomm", "popper": "popper", "popup": "popup", diff --git a/lock/flake.nix b/lock/flake.nix index c59a63a..9208061 100644 --- a/lock/flake.nix +++ b/lock/flake.nix @@ -1,6 +1,5 @@ { - description = - "THIS IS AN AUTO-GENERATED FILE. PLEASE DON'T EDIT IT MANUALLY."; + description = "THIS IS AN AUTO-GENERATED FILE. PLEASE DON'T EDIT IT MANUALLY."; inputs = { aio = { flake = false; @@ -217,12 +216,6 @@ repo = "elisp-refs"; type = "github"; }; - ellama = { - flake = false; - owner = "s-kostyaev"; - repo = "ellama"; - type = "github"; - }; elm-mode = { flake = false; owner = "jcollard"; @@ -360,6 +353,12 @@ repo = "goto-chg"; type = "github"; }; + gptel = { + flake = false; + owner = "karthink"; + repo = "gptel"; + type = "github"; + }; gradle-mode = { flake = false; owner = "scubacabra"; @@ -509,12 +508,6 @@ repo = "link-hint.el"; type = "github"; }; - llm = { - flake = false; - owner = "ahyatt"; - repo = "llm"; - type = "github"; - }; log4e = { flake = false; owner = "aki2o"; @@ -706,13 +699,6 @@ repo = "pdf-tools"; type = "github"; }; - plz = { - flake = false; - owner = "alphapapa"; - ref = "stable"; - repo = "plz.el"; - type = "github"; - }; pomm = { flake = false; owner = "SqrtMinusOne";