renderers: add global flag for setting [img] tags (#12669)

Adds a temporary global flag to renderers that causes renderers to always
render images as [img]. In a follow up change, we will consider making this
the default, and this flag could eventually be removed
This commit is contained in:
Jeffrey Morgan
2025-10-16 16:37:32 -07:00
committed by GitHub
parent e2a0b24435
commit 65fb3ff49d
5 changed files with 56 additions and 14 deletions

View File

@@ -39,6 +39,7 @@ import (
"github.com/ollama/ollama/logutil"
"github.com/ollama/ollama/middleware"
"github.com/ollama/ollama/model/parsers"
"github.com/ollama/ollama/model/renderers"
"github.com/ollama/ollama/server/internal/client/ollama"
"github.com/ollama/ollama/server/internal/registry"
"github.com/ollama/ollama/template"
@@ -91,6 +92,9 @@ func init() {
}
gin.SetMode(mode)
// Tell renderers to use [img] tags
renderers.RenderImgTags = true
}
var (