|
@@ -229,6 +229,19 @@ func TestChatPrompt(t *testing.T) {
|
|
|
prompt: "You're a test, Harry! I-I'm a what? A test. And a thumping good one at that, I'd wager. ",
|
|
|
},
|
|
|
},
|
|
|
+ {
|
|
|
+ name: "messages with mllama single prompt",
|
|
|
+ model: mllamaModel,
|
|
|
+ limit: 2048,
|
|
|
+ msgs: []api.Message{
|
|
|
+ {Role: "user", Content: "How many hotdogs are in this image?", Images: []api.ImageData{imgBuf}},
|
|
|
+ },
|
|
|
+ expect: expect{
|
|
|
+ prompt: "<|image|>How many hotdogs are in this image? ",
|
|
|
+ images: [][]byte{imgBuf},
|
|
|
+ aspectRatioID: 1,
|
|
|
+ },
|
|
|
+ },
|
|
|
{
|
|
|
name: "messages with mllama",
|
|
|
model: mllamaModel,
|
|
@@ -259,6 +272,21 @@ func TestChatPrompt(t *testing.T) {
|
|
|
aspectRatioID: 1,
|
|
|
},
|
|
|
},
|
|
|
+ {
|
|
|
+ name: "earlier image with mllama",
|
|
|
+ model: mllamaModel,
|
|
|
+ limit: 2048,
|
|
|
+ msgs: []api.Message{
|
|
|
+ {Role: "user", Content: "How many hotdogs are in this image?", Images: []api.ImageData{imgBuf}},
|
|
|
+ {Role: "assistant", Content: "There are four hotdogs."},
|
|
|
+ {Role: "user", Content: "Which ones have mustard?"},
|
|
|
+ },
|
|
|
+ expect: expect{
|
|
|
+ prompt: "<|image|>How many hotdogs are in this image? There are four hotdogs. Which ones have mustard? ",
|
|
|
+ images: [][]byte{imgBuf},
|
|
|
+ aspectRatioID: 1,
|
|
|
+ },
|
|
|
+ },
|
|
|
{
|
|
|
name: "too many images with mllama",
|
|
|
model: mllamaModel,
|