Skip to content

Commit

Permalink
different user
Browse files Browse the repository at this point in the history
  • Loading branch information
qingyun-wu committed Feb 12, 2024
1 parent 5b93f08 commit c5617af
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions test/agentchat/test_chats.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,18 @@ def test_chats_general():
}, # Please set use_docker=True if docker is available to run the generated code. Using docker is safer than running the generated code directly.
)

user_2 = UserProxyAgent(
name="User",
human_input_mode="NEVER",
is_termination_msg=lambda x: x.get("content", "").find("TERMINATE") >= 0,
max_consecutive_auto_reply=3,
code_execution_config={
"last_n_messages": 1,
"work_dir": "tasks",
"use_docker": False,
}, # Please set use_docker=True if docker is available to run the generated code. Using docker is safer than running the generated code directly.
)

def my_summary_method(recipient, sender):
return recipient.chat_messages[sender][0].get("content", "")

Expand All @@ -290,7 +302,7 @@ def my_summary_method(recipient, sender):
"summary_method": my_summary_method,
},
{
"sender": user,
"sender": user_2,
"recipient": financial_assistant_2,
"message": financial_tasks[1],
"silent": True,
Expand Down Expand Up @@ -471,9 +483,9 @@ def currency_calculator(


if __name__ == "__main__":
test_chats()
# test_chats()
test_chats_general()
test_chats_exceptions()
# test_chats_exceptions()
# test_chats_group()
# test_chats_w_func()
# test_chat_messages_for_summary()

0 comments on commit c5617af

Please sign in to comment.