Skip to content

Commit 23caea8

Browse files
authored
Update test_groupchat.py pre-commit tidy
1 parent e1d2b87 commit 23caea8

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

test/agentchat/test_groupchat.py

+11-3
Original file line numberDiff line numberDiff line change
@@ -2061,6 +2061,7 @@ def test_manager_resume_messages():
20612061
with pytest.raises(Exception):
20622062
return_agent, return_message = manager.resume(messages="Let's get this conversation started.")
20632063

2064+
20642065
def test_custom_model_client():
20652066
class CustomModelClient:
20662067
def __init__(self, config, **kwargs):
@@ -2097,18 +2098,24 @@ def get_usage(response):
20972098
llm_config = {"config_list": [{"model": "test_model_name", "model_client_cls": "CustomModelClient"}]}
20982099

20992100
group_chat = autogen.GroupChat(
2100-
agents=[], messages=[], max_round=3, select_speaker_auto_llm_config=llm_config,
2101-
select_speaker_auto_model_client_cls=CustomModelClient
2101+
agents=[],
2102+
messages=[],
2103+
max_round=3,
2104+
select_speaker_auto_llm_config=llm_config,
2105+
select_speaker_auto_model_client_cls=CustomModelClient,
21022106
)
21032107

2104-
checking_agent, speaker_selection_agent = group_chat._create_internal_agents(agents=[], messages=[], max_attempts=3, validate_speaker_name=(True, "test"))
2108+
checking_agent, speaker_selection_agent = group_chat._create_internal_agents(
2109+
agents=[], messages=[], max_attempts=3, validate_speaker_name=(True, "test")
2110+
)
21052111

21062112
# Check that the custom model client is assigned to the speaker selection agent
21072113
assert isinstance(speaker_selection_agent.client._clients[0], CustomModelClient)
21082114

21092115
# Check that the LLM Config is assigned
21102116
assert speaker_selection_agent.client._config_list == llm_config["config_list"]
21112117

2118+
21122119
def test_select_speaker_transform_messages():
21132120
"""Tests adding transform messages to a GroupChat for speaker selection when in 'auto' mode"""
21142121

@@ -2148,6 +2155,7 @@ def test_select_speaker_transform_messages():
21482155

21492156
assert groupchat_none._speaker_selection_transforms is None
21502157

2158+
21512159
if __name__ == "__main__":
21522160
# test_func_call_groupchat()
21532161
# test_broadcast()

0 commit comments

Comments
 (0)