emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ellama 1458fc0086 2/2: Merge pull request #80 from s-ko


From: ELPA Syncer
Subject: [elpa] externals/ellama 1458fc0086 2/2: Merge pull request #80 from s-kostyaev/add-provider-to-chat-command
Date: Fri, 23 Feb 2024 09:58:00 -0500 (EST)

branch: externals/ellama
commit 1458fc008661f5a0b7f1d51b1cc5d1641a44360d
Merge: 6622630860 33b9fcd3dc
Author: Sergey Kostyaev <s-kostyaev@users.noreply.github.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #80 from s-kostyaev/add-provider-to-chat-command
    
    Add provider to ellama chat arguments
---
 ellama.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/ellama.el b/ellama.el
index 1bd63f6651..83766280f7 100644
--- a/ellama.el
+++ b/ellama.el
@@ -931,10 +931,13 @@ Will call `ellama-chat-done-callback' on TEXT."
     (funcall ellama-chat-done-callback text)))
 
 ;;;###autoload
-(defun ellama-chat (prompt &optional create-session)
+(defun ellama-chat (prompt &optional create-session &rest args)
   "Send PROMPT to ellama chat with conversation history.
 
-If CREATE-SESSION set, creates new session even if there is an active session."
+If CREATE-SESSION set, creates new session even if there is an active session.
+ARGS contains keys for fine control.
+
+:provider PROVIDER -- PROVIDER is an llm provider for generation."
   (interactive "sAsk ellama: ")
   (let* ((providers (progn
                      (push '("default model" . ellama-provider)
@@ -949,7 +952,8 @@ If CREATE-SESSION set, creates new session even if there is 
an active session."
                       (eval (alist-get
                              (completing-read "Select model: " variants)
                              providers nil nil #'string=))
-                    ellama-provider))
+                    (or (plist-get :provider args)
+                        ellama-provider)))
         (session (if (or create-session
                          current-prefix-arg
                          (and (not ellama--current-session)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]