From 7fe3902552f762e6cc4f78eb83b2a60c6a6e61d8 Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Wed, 9 Oct 2024 20:46:27 -0700 Subject: [PATCH] cli: Send all images in conversation history Currently the CLI only sends images from the most recent image- containing message. This prevents doing things like sending one message with an image and then a follow message with a second image and asking for comparision based on additional information not present in any text that was output. It's possible that some models have a problem with this but the CLI is not the right place to do this since any adjustments are model-specific and should affect all clients. Both llava:34b and minicpm-v do reasonable things with multiple images in the history. --- cmd/interactive.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/cmd/interactive.go b/cmd/interactive.go index 94578f11b66..1b4b187b903 100644 --- a/cmd/interactive.go +++ b/cmd/interactive.go @@ -442,13 +442,6 @@ func generateInteractive(cmd *cobra.Command, opts runOptions) error { return err } - // clear all previous images for better responses - if len(images) > 0 { - for i := range opts.Messages { - opts.Messages[i].Images = nil - } - } - newMessage.Content = msg newMessage.Images = images }