mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
fix: duplicate goodbye msg
This commit is contained in:
parent
af6a92a4c2
commit
57faddd808
2 changed files with 11 additions and 14 deletions
11
run_agent.py
11
run_agent.py
|
|
@ -3492,12 +3492,15 @@ class AIAgent:
|
|||
if thinking_spinner:
|
||||
thinking_spinner.stop("")
|
||||
thinking_spinner = None
|
||||
|
||||
response = self._interruptible_streaming_api_call(
|
||||
api_kwargs, on_first_delta=_stop_spinner)
|
||||
# Newline after streamed content so tool lines don't overwrite it
|
||||
if response and hasattr(response, 'choices') and response.choices:
|
||||
msg = response.choices[0].message
|
||||
if msg and msg.content and msg.tool_calls:
|
||||
|
||||
# Separate streamed content from tool status lines
|
||||
msg = getattr(response, "choices", [None])[0]
|
||||
if msg and getattr(msg, "message", None):
|
||||
m = msg.message
|
||||
if m.content and m.tool_calls:
|
||||
print(flush=True)
|
||||
else:
|
||||
response = self._interruptible_api_call(api_kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue