Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
9b8187b4
Unverified
Commit
9b8187b4
authored
Sep 18, 2025
by
frob
Committed by
GitHub
Sep 17, 2025
Browse files
server: skip parsing initial <think> if provided in the prompt for /api/generate (#12289)
parent
8b894933
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
server/routes.go
server/routes.go
+3
-0
No files found.
server/routes.go
View file @
9b8187b4
...
@@ -429,6 +429,9 @@ func (s *Server) GenerateHandler(c *gin.Context) {
...
@@ -429,6 +429,9 @@ func (s *Server) GenerateHandler(c *gin.Context) {
OpeningTag
:
openingTag
,
OpeningTag
:
openingTag
,
ClosingTag
:
closingTag
,
ClosingTag
:
closingTag
,
}
}
if
strings
.
HasSuffix
(
strings
.
TrimSpace
(
prompt
),
openingTag
)
{
thinkingState
.
AddContent
(
openingTag
)
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment