routes: fix built-in renderers for api/generate

Made it so when api/generate builds up a message array and generates the
prompt it now goes through the same function as `api/chat` for
consistency. This is where we hook the optional built-in renderers to
bypass templates, which was missing for `api/generate` before this
change.

Closes: #12578
This commit is contained in:
Devon Rifkin
2025-10-11 13:57:43 -07:00
parent 0c68ec8d6a
commit 6db8da9958
3 changed files with 341 additions and 10 deletions

View File

@@ -146,7 +146,7 @@ func TestGenerateDebugRenderOnly(t *testing.T) {
DebugRenderOnly: true,
},
expectDebug: true,
expectTemplate: "[img-0]\n\nDescribe this image",
expectTemplate: "[img-0]Describe this image",
expectNumImages: 1,
},
{