mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 18:36:41 +02:00
prepend image tags (#2789)
instead of appending image tags, prepend them - this generally produces better results
This commit is contained in:
parent
fa2f2b3563
commit
0e19476b56
3 changed files with 21 additions and 18 deletions
|
@ -155,7 +155,7 @@ func TestChatPrompt(t *testing.T) {
|
|||
{Role: "user", Content: "Hello", Images: []api.ImageData{[]byte("base64")}},
|
||||
},
|
||||
window: 1024,
|
||||
want: "You are a Wizard. Hello [img-0]",
|
||||
want: "You are a Wizard. [img-0] Hello",
|
||||
},
|
||||
{
|
||||
name: "images truncated",
|
||||
|
@ -165,7 +165,7 @@ func TestChatPrompt(t *testing.T) {
|
|||
{Role: "user", Content: "Hello", Images: []api.ImageData{[]byte("img1"), []byte("img2")}},
|
||||
},
|
||||
window: 1024,
|
||||
want: "You are a Wizard. Hello [img-1]",
|
||||
want: "You are a Wizard. [img-0] [img-1] Hello",
|
||||
},
|
||||
{
|
||||
name: "empty list",
|
||||
|
@ -198,7 +198,7 @@ func TestChatPrompt(t *testing.T) {
|
|||
}
|
||||
|
||||
if got != tc.want {
|
||||
t.Errorf("got = %v, want %v", got, tc.want)
|
||||
t.Errorf("got: %q, want: %q", got, tc.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue