clear previous images when submitting an image to ollama run
(#2316)
This commit is contained in:
parent
f43dea68d1
commit
38296ab352
1 changed files with 8 additions and 0 deletions
|
@ -496,6 +496,14 @@ func generateInteractive(cmd *cobra.Command, opts runOptions) error {
|
|||
if err != nil {
|
||||
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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue