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

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

[nongnu] elpa/gptel 63a6f89182 22/24: gptel: Handle Ollama + streaming +


From: ELPA Syncer
Subject: [nongnu] elpa/gptel 63a6f89182 22/24: gptel: Handle Ollama + streaming + tool-use incompatibility
Date: Mon, 20 Jan 2025 16:01:25 -0500 (EST)

branch: elpa/gptel
commit 63a6f8918229ba382533e3980bc8ee129d933667
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>

    gptel: Handle Ollama + streaming + tool-use incompatibility
    
    * gptel.el (gptel-request): Turn off streaming if using Ollama +
    tools.  This is the wrong place for this check, but it's not clear
    how to place this check in gptel-ollama.el so it will be invoked
    in the construction of a request payload.
---
 gptel.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gptel.el b/gptel.el
index e4b4a44b41..fac1f6db02 100644
--- a/gptel.el
+++ b/gptel.el
@@ -2096,7 +2096,12 @@ be used to rerun or continue the request at a later 
time."
                      (eq gptel-use-context 'system))
                 (gptel-context--wrap (car directive))
               (car directive))))
+         ;; TODO(tool) Limit tool use to capable models after documenting 
:capabilities
+         ;; (gptel-use-tools (and (gptel--model-capable-p 'tool-use) 
gptel-use-tools))
          (stream (and stream gptel-use-curl
+                      ;; HACK(tool): no stream if Ollama + tools.  Need to 
find a better way
+                      (not (and (eq (type-of gptel-backend) 'gptel-ollama)
+                                gptel-tools gptel-use-tools))
                       ;; Check model-specific request-params for streaming 
preference
                       (let* ((model-params (gptel--model-request-params 
gptel-model))
                              (stream-spec (plist-get model-params :stream)))



reply via email to

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