Skip to content

Commit 7551d18

Browse files
qingyun-wusonichi
andauthored
add agent notebook and documentation (microsoft#1052)
* add agent notebook and documentation * fix bug * set flush to True when printing msg in agent * add a math problem in agent notebook * remove * header * improve notebook doc * notebook update * improve notebook example * improve doc * improve notebook doc * improve print * doc * human_input_mode * human_input_mode str * indent * indent * Update flaml/autogen/agent/user_proxy_agent.py Co-authored-by: Chi Wang <[email protected]> * Update notebook/autogen_agent.ipynb Co-authored-by: Chi Wang <[email protected]> * Update notebook/autogen_agent.ipynb Co-authored-by: Chi Wang <[email protected]> * Update notebook/autogen_agent.ipynb Co-authored-by: Chi Wang <[email protected]> * renaming and doc format * typo --------- Co-authored-by: Chi Wang <[email protected]>
1 parent c3381c0 commit 7551d18

File tree

4 files changed

+718
-2
lines changed

4 files changed

+718
-2
lines changed

flaml/autogen/agent/agent.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def _send(self, message, recipient):
3737

3838
def _receive(self, message, sender):
3939
"""Receive a message from another agent."""
40-
print("\n****", self.name, "received message from", sender.name, "****\n")
41-
print(message)
40+
print("\n****", self.name, "received message from", sender.name, "****\n", flush=True)
41+
print(message, flush=True)
4242
self._conversations[sender.name].append({"content": message, "role": "user"})
4343

4444
def receive(self, message, sender):

flaml/autogen/agent/user_proxy_agent.py

+1
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,5 @@ def receive(self, message, sender):
119119
return
120120

121121
self._consecutive_auto_reply_counter[sender.name] += 1
122+
print("\n>>>>>>>> NO HUMAN INPUT RECEIVED. USING AUTO REPLY FOR THE USER...", flush=True)
122123
self.auto_reply(message, sender, default_reply=reply)

0 commit comments

Comments
 (0)