@@ -917,6 +917,7 @@ def __init__(
917
917
max_consecutive_auto_reply : Optional [int ] = sys .maxsize ,
918
918
human_input_mode : Optional [str ] = "NEVER" ,
919
919
system_message : Optional [Union [str , List ]] = "Group chat manager." ,
920
+ silent : bool = False ,
920
921
** kwargs ,
921
922
):
922
923
if (
@@ -940,6 +941,8 @@ def __init__(
940
941
# Store groupchat
941
942
self ._groupchat = groupchat
942
943
944
+ self ._silent = silent
945
+
943
946
# Order of register_reply is important.
944
947
# Allow sync chat if initiated using initiate_chat
945
948
self .register_reply (Agent , GroupChatManager .run_chat , config = groupchat , reset_config = GroupChat .reset )
@@ -992,6 +995,7 @@ def run_chat(
992
995
speaker = sender
993
996
groupchat = config
994
997
send_introductions = getattr (groupchat , "send_introductions" , False )
998
+ silent = getattr (self , "_silent" , False )
995
999
996
1000
if send_introductions :
997
1001
# Broadcast the intro
@@ -1046,7 +1050,7 @@ def run_chat(
1046
1050
reply ["content" ] = self .clear_agents_history (reply , groupchat )
1047
1051
1048
1052
# The speaker sends the message without requesting a reply
1049
- speaker .send (reply , self , request_reply = False )
1053
+ speaker .send (reply , self , request_reply = False , silent = silent )
1050
1054
message = self .last_message (speaker )
1051
1055
if self .client_cache is not None :
1052
1056
for a in groupchat .agents :
@@ -1067,6 +1071,7 @@ async def a_run_chat(
1067
1071
speaker = sender
1068
1072
groupchat = config
1069
1073
send_introductions = getattr (groupchat , "send_introductions" , False )
1074
+ silent = getattr (self , "_silent" , False )
1070
1075
1071
1076
if send_introductions :
1072
1077
# Broadcast the intro
@@ -1111,7 +1116,7 @@ async def a_run_chat(
1111
1116
if reply is None :
1112
1117
break
1113
1118
# The speaker sends the message without requesting a reply
1114
- await speaker .a_send (reply , self , request_reply = False )
1119
+ await speaker .a_send (reply , self , request_reply = False , silent = silent )
1115
1120
message = self .last_message (speaker )
1116
1121
if self .client_cache is not None :
1117
1122
for a in groupchat .agents :
0 commit comments