Skip to content

Commit

Permalink
Fix check_termination_and_human_reply() when called with messages == …
Browse files Browse the repository at this point in the history
…[] (#1132)
  • Loading branch information
davorrunje authored Feb 25, 2025
1 parent ac7b94e commit 4296e8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions autogen/agentchat/conversable_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -2179,7 +2179,12 @@ def check_termination_and_human_reply(
config = self
if messages is None:
messages = self._oai_messages[sender] if sender else []

# if there are no messages, continue the conversation
if not messages:
return False, None
message = messages[-1]

reply = ""
no_human_input_msg = ""
sender_name = "the sender" if sender is None else sender.name
Expand Down

0 comments on commit 4296e8c

Please sign in to comment.