mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-11 16:26:59 +00:00
Do not repeat system prompt for chat templating (#2241)
This commit is contained in:
@@ -239,6 +239,11 @@ func GenerateHandler(c *gin.Context) {
|
||||
Prompt: req.Prompt,
|
||||
First: len(req.Context) == 0,
|
||||
}
|
||||
|
||||
if promptVars.System == "" {
|
||||
promptVars.System = model.System
|
||||
}
|
||||
|
||||
p, err := model.PreResponsePrompt(promptVars)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||
|
||||
Reference in New Issue
Block a user