Skip to content

Commit

Permalink
feat: replace ellama with gptel
Browse files Browse the repository at this point in the history
  • Loading branch information
terlar committed Sep 2, 2024
1 parent eab6813 commit 4be4efb
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 82 deletions.
28 changes: 19 additions & 9 deletions init.org
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
69 changes: 17 additions & 52 deletions lock/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 7 additions & 21 deletions lock/flake.nix
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -360,6 +353,12 @@
repo = "goto-chg";
type = "github";
};
gptel = {
flake = false;
owner = "karthink";
repo = "gptel";
type = "github";
};
gradle-mode = {
flake = false;
owner = "scubacabra";
Expand Down Expand Up @@ -509,12 +508,6 @@
repo = "link-hint.el";
type = "github";
};
llm = {
flake = false;
owner = "ahyatt";
repo = "llm";
type = "github";
};
log4e = {
flake = false;
owner = "aki2o";
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit 4be4efb

Please sign in to comment.