[GH-ISSUE #7257] Return Triggered Stop Sequence #30373

Open
opened 2026-04-22 09:56:45 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @someone13574 on GitHub (Oct 18, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7257

It would be extremely useful if the API response contained which stop sequence was triggered if there are multiple listed. For example, if you have the model's default stop sequence and a custom one which you want to trigger an action, you currently need to carefully choose the text leading up to it so you can determine if it was the custom stop sequence or not. It would be way easier to do this sort of thing if the api simply told you which stop sequence was triggered instead of "done_reason": "stop".

Originally created by @someone13574 on GitHub (Oct 18, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7257 It would be extremely useful if the API response contained *which* stop sequence was triggered if there are multiple listed. For example, if you have the model's default stop sequence and a custom one which you want to trigger an action, you currently need to carefully choose the text leading up to it so you can determine if it was the custom stop sequence or not. It would be way easier to do this sort of thing if the api simply told you which stop sequence was triggered instead of `"done_reason": "stop"`.
GiteaMirror added the feature requestapi labels 2026-04-22 09:56:45 -05:00
Author
Owner

@liponex commented on GitHub (Dec 18, 2024):

That would be very useful to have!

<!-- gh-comment-id:2550611205 --> @liponex commented on GitHub (Dec 18, 2024): That would be very useful to have!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#30373