Skip to content

Commit

Permalink
cli: Send all images in conversation history
Browse files Browse the repository at this point in the 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.
  • Loading branch information
jessegross committed Oct 10, 2024
1 parent 0077e22 commit 7fe3902
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions cmd/interactive.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 7fe3902

Please sign in to comment.