Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion run_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,15 @@ def _has_natural_response_ending(content: str) -> bool:
return False
if stripped.endswith("```"):
return True
return stripped[-1] in '.!?:)"\']}γ€‚οΌοΌŸοΌšοΌ‰γ€‘γ€γ€γ€‹'
if stripped.endswith('^'):
return True
last = stripped[-1]
if last in '.!?:)"\']}γ€‚οΌοΌŸοΌšοΌ‰γ€‘γ€γ€γ€‹^':
return True
# Emoji ranges (Misc Symbols, Dingbats, Emoticons, Supplemental, etc.)
if ord(last) >= 0x1F300:
return True
return False

def _is_ollama_glm_backend(self) -> bool:
"""Detect the narrow backend family affected by Ollama/GLM stop misreports."""
Expand Down