mirror of
https://github.com/ollama/ollama.git
synced 2025-11-12 21:26:50 +01:00
server: skip parsing initial <think> if provided in the prompt (#12024)
This commit is contained in:
@@ -1673,6 +1673,10 @@ func (s *Server) ChatHandler(c *gin.Context) {
|
||||
OpeningTag: openingTag,
|
||||
ClosingTag: closingTag,
|
||||
}
|
||||
|
||||
if strings.HasSuffix(strings.TrimSpace(prompt), openingTag) {
|
||||
thinkingState.AddContent(openingTag)
|
||||
}
|
||||
}
|
||||
|
||||
var toolParser *tools.Parser
|
||||
|
||||
Reference in New Issue
Block a user