mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-18 09:51:59 +00:00
feat(cli): show notification when iteration budget is reached
Displays a dim warning after the response panel when the agent hit its max iterations, so the user knows the response may be incomplete.
This commit is contained in:
parent
934318ba3a
commit
67fece1176
1 changed files with 11 additions and 0 deletions
11
cli.py
11
cli.py
|
|
@ -7842,6 +7842,17 @@ class HermesCLI:
|
|||
sys.stdout.write("\a")
|
||||
sys.stdout.flush()
|
||||
|
||||
# Notify when iteration budget was hit
|
||||
if result and not result.get("completed") and not result.get("interrupted"):
|
||||
_api_calls = result.get("api_calls", 0)
|
||||
if _api_calls >= getattr(self.agent, "max_iterations", 90):
|
||||
_max_iter = getattr(self.agent, "max_iterations", 90)
|
||||
_cprint(
|
||||
f"\n{_DIM}⚠ Iteration budget reached "
|
||||
f"({_api_calls}/{_max_iter}) — "
|
||||
f"response may be incomplete{_RST}"
|
||||
)
|
||||
|
||||
# Speak response aloud if voice TTS is enabled
|
||||
# Skip batch TTS when streaming TTS already handled it
|
||||
if self._voice_tts and response and not use_streaming_tts:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue