branch: elpa/gptel
commit f08065ddcf18486b94f024ee7a0fe944b42bbfa7
Author: Karthik Chikmagalur <karthikchikmaga...@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmaga...@gmail.com>

    gptel-ollama: Fix media injection for Ollama (#790)
    
    * gptel-ollama.el (gptel--wrap-user-prompt): Include the image in
    the first user prompt correctly.  This is only called when
    including an image from gptel's context with `gptel-add'.
---
 gptel-ollama.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gptel-ollama.el b/gptel-ollama.el
index 006d73b246..f4387f586a 100644
--- a/gptel-ollama.el
+++ b/gptel-ollama.el
@@ -228,7 +228,7 @@ If INJECT-MEDIA is non-nil wrap it with base64-encoded 
media files in the contex
         (cl-callf (lambda (images)
                     (vconcat (plist-get media-processed :images)
                              images))
-            (plist-get (cadr prompts) :images)))
+            (plist-get (car prompts) :images)))
     ;; Wrap the last user prompt with included text contexts
     (cl-callf gptel-context--wrap (plist-get (car (last prompts)) :content))))
 

Reply via email to