Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
gemma3: Allow multiple image in a single input
Jesse Gross7bf793a6007c
diff --git a/server/prompt.go b/server/prompt.goindex d053f2a8d..5b5b958f1 100644--- a/server/prompt.go+++ b/server/prompt.go@@ -26,7 +26,6 @@ func chatPrompt(ctx context.Context, m *Model, tokenize tokenizeFunc, opts *api.var system []api.MessageisMllama := checkMllamaModelFamily(m)- isGemma3 := checkGemma3ModelFamily(m)var imageNumTokens int// TODO: Ideally we would compute this from the projector metadata but some pieces are implementation dependent@@ -41,7 +40,7 @@ func chatPrompt(ctx context.Context, m *Model, tokenize tokenizeFunc, opts *api.n := len(msgs) - 1// in reverse, find all messages that fit into context windowfor i := n; i >= 0; i-- {- if (isMllama || isGemma3) && len(msgs[i].Images) > 1 {+ if isMllama && len(msgs[i].Images) > 1 {return "", nil, errTooManyImages}@@ -158,12 +157,3 @@ func checkMllamaModelFamily(m *Model) bool {}return false}--func checkGemma3ModelFamily(m *Model) bool {- for _, arch := range m.Config.ModelFamilies {- if arch == "gemma3" {- return true- }- }- return false-}