Skip to content

Commit f749dee

Browse files
authored
adjust the order of message processing (#1841)
1 parent 2912f55 commit f749dee

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

autogen/agentchat/conversable_agent.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1732,14 +1732,14 @@ def generate_reply(
17321732
if messages is None:
17331733
messages = self._oai_messages[sender]
17341734

1735-
# Call the hookable method that gives registered hooks a chance to process all messages.
1736-
# Message modifications do not affect the incoming messages or self._oai_messages.
1737-
messages = self.process_all_messages_before_reply(messages)
1738-
17391735
# Call the hookable method that gives registered hooks a chance to process the last message.
17401736
# Message modifications do not affect the incoming messages or self._oai_messages.
17411737
messages = self.process_last_received_message(messages)
17421738

1739+
# Call the hookable method that gives registered hooks a chance to process all messages.
1740+
# Message modifications do not affect the incoming messages or self._oai_messages.
1741+
messages = self.process_all_messages_before_reply(messages)
1742+
17431743
for reply_func_tuple in self._reply_func_list:
17441744
reply_func = reply_func_tuple["reply_func"]
17451745
if "exclude" in kwargs and reply_func in kwargs["exclude"]:

autogen/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.2.16"
1+
__version__ = "0.2.17"

0 commit comments

Comments
 (0)