mirror of
https://github.com/ollama/ollama.git
synced 2025-11-11 18:27:06 +01:00
server: skip parsing initial <think> if provided in the prompt for /api/generate (#12289)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user