Skip to content

Commit 34605ad

Browse files
authored
feat: replace ellama with gptel (#401)
1 parent eab6813 commit 34605ad

File tree

3 files changed

+43
-82
lines changed

3 files changed

+43
-82
lines changed

init.org

+19-9
Original file line numberDiff line numberDiff line change
@@ -3965,19 +3965,29 @@ Visual undo history navigation.
39653965
#+end_src
39663966

39673967
** AI
3968-
*** ellama
3968+
*** gptel
39693969
#+begin_src emacs-lisp :tangle yes
3970-
(use-package ellama
3970+
(use-package gptel
39713971
:ensure t
39723972
:functions
3973-
(make-llm-ollama)
3974-
:bind-keymap
3975-
("C-, e" . ellama-command-map)
3973+
(gptel-make-ollama)
3974+
:bind
3975+
((:map leader-map
3976+
("g" . gptel-menu)
3977+
("G" . gptel)))
39763978
:config
3977-
(setq ellama-auto-scroll t)
3978-
(setq ellama-provider
3979-
(make-llm-ollama :chat-model "llama3.1"
3980-
:embedding-model "llama3.1")))
3979+
(setq gptel-model "llama3.1:latest")
3980+
(setq gptel-backend (gptel-make-ollama "Ollama"
3981+
:host "localhost:11434"
3982+
:stream t
3983+
:models '("llama3.1:latest"
3984+
"gemma2:latest")))
3985+
(setq gptel-default-mode 'org-mode)
3986+
3987+
(cl-pushnew
3988+
'(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.")
3989+
gptel-directives
3990+
:test #'equal))
39813991
#+end_src
39823992

39833993
* Testing

lock/flake.lock

+17-52
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lock/flake.nix

+7-21
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
description =
3-
"THIS IS AN AUTO-GENERATED FILE. PLEASE DON'T EDIT IT MANUALLY.";
2+
description = "THIS IS AN AUTO-GENERATED FILE. PLEASE DON'T EDIT IT MANUALLY.";
43
inputs = {
54
aio = {
65
flake = false;
@@ -217,12 +216,6 @@
217216
repo = "elisp-refs";
218217
type = "github";
219218
};
220-
ellama = {
221-
flake = false;
222-
owner = "s-kostyaev";
223-
repo = "ellama";
224-
type = "github";
225-
};
226219
elm-mode = {
227220
flake = false;
228221
owner = "jcollard";
@@ -360,6 +353,12 @@
360353
repo = "goto-chg";
361354
type = "github";
362355
};
356+
gptel = {
357+
flake = false;
358+
owner = "karthink";
359+
repo = "gptel";
360+
type = "github";
361+
};
363362
gradle-mode = {
364363
flake = false;
365364
owner = "scubacabra";
@@ -509,12 +508,6 @@
509508
repo = "link-hint.el";
510509
type = "github";
511510
};
512-
llm = {
513-
flake = false;
514-
owner = "ahyatt";
515-
repo = "llm";
516-
type = "github";
517-
};
518511
log4e = {
519512
flake = false;
520513
owner = "aki2o";
@@ -706,13 +699,6 @@
706699
repo = "pdf-tools";
707700
type = "github";
708701
};
709-
plz = {
710-
flake = false;
711-
owner = "alphapapa";
712-
ref = "stable";
713-
repo = "plz.el";
714-
type = "github";
715-
};
716702
pomm = {
717703
flake = false;
718704
owner = "SqrtMinusOne";

0 commit comments

Comments
 (0)