server: skip parsing initial <think> if provided in the prompt for /api/generate (#12289)
This commit is contained in:
parent
8b894933a7
commit
9b8187b487
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue