Skip to content

Commit f08065d

Browse files
committed
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'.
1 parent 7f9b063 commit f08065d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gptel-ollama.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ If INJECT-MEDIA is non-nil wrap it with base64-encoded media files in the contex
228228
(cl-callf (lambda (images)
229229
(vconcat (plist-get media-processed :images)
230230
images))
231-
(plist-get (cadr prompts) :images)))
231+
(plist-get (car prompts) :images)))
232232
;; Wrap the last user prompt with included text contexts
233233
(cl-callf gptel-context--wrap (plist-get (car (last prompts)) :content))))
234234

0 commit comments

Comments
 (0)