server: skip parsing initial <think> if provided in the prompt for /api/generate (#12289)

This commit is contained in:
frob
2025-09-18 01:39:04 +02:00
committed by GitHub
parent 8b894933a7
commit 9b8187b487

View File

@@ -429,6 +429,9 @@ func (s *Server) GenerateHandler(c *gin.Context) {
OpeningTag: openingTag,
ClosingTag: closingTag,
}
if strings.HasSuffix(strings.TrimSpace(prompt), openingTag) {
thinkingState.AddContent(openingTag)
}
}
}