[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ellama b224bab33c 2/8: Merge pull request #142 from s-k
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ellama b224bab33c 2/8: Merge pull request #142 from s-kostyaev/improve-ollama-binary-customization |
Date: |
Wed, 10 Jul 2024 18:58:03 -0400 (EDT) |
branch: externals/ellama
commit b224bab33c03ed012a3fc3aae55d123e0107e49d
Merge: d6d38df99d 4a05ba5924
Author: Sergey Kostyaev <s-kostyaev@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Merge pull request #142 from s-kostyaev/improve-ollama-binary-customization
Allow ollama-binary to accept the executable's base name
---
ellama.el | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/ellama.el b/ellama.el
index eaffd53c61..22d9f9d1c4 100644
--- a/ellama.el
+++ b/ellama.el
@@ -172,7 +172,7 @@
(ellama-setup-keymap)))
:group 'ellama)
-(defcustom ellama-ollama-binary (executable-find "ollama")
+(defcustom ellama-ollama-binary "ollama"
"Path to ollama binary."
:type 'string
:group 'ellama)
@@ -1549,9 +1549,11 @@ ARGS contains keys for fine control.
:on-done ON-DONE -- ON-DONE a function that's called with
the full response text when the request completes (with BUFFER current)."
(interactive "sAsk ellama: ")
- (let* ((providers (append
+ (let* ((ollama-binary (executable-find ellama-ollama-binary))
+ (providers (append
`(("default model" . ellama-provider)
- ,(if (and ellama-ollama-binary (file-exists-p
ellama-ollama-binary))
+ ,(if (and ollama-binary
+ (file-exists-p ollama-binary))
'("ollama model" .
(ellama-get-ollama-local-model))))
ellama-providers))
(variants (mapcar #'car providers))
@@ -1926,7 +1928,9 @@ otherwise prompt user for URL to summarize."
(mapcar (lambda (s)
(car (split-string s)))
(seq-drop
- (process-lines ellama-ollama-binary "ls")
1))))
+ (process-lines
+ (executable-find ellama-ollama-binary) "ls")
+ 1))))
(host (when (llm-ollama-p ellama-provider)
(llm-ollama-host ellama-provider)))
(port (when (llm-ollama-p ellama-provider)
@@ -1941,12 +1945,14 @@ otherwise prompt user for URL to summarize."
(defun ellama-provider-select ()
"Select ellama provider."
(interactive)
- (let* ((providers (append
+ (let* ((ollama-binary (executable-find ellama-ollama-binary))
+ (providers (append
`(("default model" . ellama-provider)
- ,(if (and ellama-ollama-binary (file-exists-p
ellama-ollama-binary))
- '("ollama model" .
(ellama-get-ollama-local-model))))
+ ,(if (and ollama-binary
+ (file-exists-p ollama-binary))
+ '("ollama model" .
(ellama-get-ollama-local-model))))
ellama-providers))
- (variants (mapcar #'car providers)))
+ (variants (mapcar #'car providers)))
(setq ellama-provider
(eval (alist-get
(completing-read "Select model: " variants)
- [elpa] externals/ellama updated (d6d38df99d -> 8ee58b9f85), ELPA Syncer, 2024/07/10
- [elpa] externals/ellama 4a05ba5924 1/8: Allow ollama-binary to accept the executable's base name, ELPA Syncer, 2024/07/10
- [elpa] externals/ellama 7941a13d39 4/8: Fix documentation, ELPA Syncer, 2024/07/10
- [elpa] externals/ellama 88d4900878 7/8: Merge pull request #143 from s-kostyaev/fix-change-current-buffer-on-commit-message-generation, ELPA Syncer, 2024/07/10
- [elpa] externals/ellama 592e2c8981 5/8: Improve commit message generation, ELPA Syncer, 2024/07/10
- [elpa] externals/ellama b224bab33c 2/8: Merge pull request #142 from s-kostyaev/improve-ollama-binary-customization,
ELPA Syncer <=
- [elpa] externals/ellama b5fbf707c3 3/8: Bump version, ELPA Syncer, 2024/07/10
- [elpa] externals/ellama ea682607c9 6/8: Add command to generate commit message to keymap, ELPA Syncer, 2024/07/10
- [elpa] externals/ellama 8ee58b9f85 8/8: Bump version, ELPA Syncer, 2024/07/10