[GH-ISSUE #9238] Stop tokens specified in the API should be included in the response #68075

Closed
opened 2026-05-04 12:26:36 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @conanoc on GitHub (Feb 20, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9238

When I invoke /api/chat with options "stop": [".", "?"], the response message does not contain the stop token.
So I cannot tell if the response stopped before "." or "?".
OpenAI APIs include them in the response message.

Originally created by @conanoc on GitHub (Feb 20, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9238 When I invoke /api/chat with options "stop": [".", "?"], the response message does not contain the stop token. So I cannot tell if the response stopped before "." or "?". OpenAI APIs include them in the response message.
GiteaMirror added the feature request label 2026-05-04 12:26:36 -05:00
Author
Owner

@conanoc commented on GitHub (Feb 20, 2025):

Related issue: https://github.com/ollama/ollama/issues/7257

<!-- gh-comment-id:2670503467 --> @conanoc commented on GitHub (Feb 20, 2025): Related issue: https://github.com/ollama/ollama/issues/7257
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#68075