Skip to content

Commit

Permalink
fix: code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Matteo Frattaroli committed May 17, 2024
1 parent 2581fb1 commit d120cbe
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions autogen/agentchat/groupchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
from dataclasses import dataclass, field
from typing import Callable, Dict, List, Literal, Optional, Tuple, Union

from ..oai.client import ModelClient
from ..code_utils import content_str
from ..exception_utils import AgentNameConflict, NoEligibleSpeaker, UndefinedNextAgent
from ..formatting_utils import colored
from ..graph_utils import check_graph_validity, invert_disallowed_to_allowed
from ..io.base import IOStream
from ..oai.client import ModelClient
from ..runtime_logging import log_new_agent, logging_enabled
from .agent import Agent
from .conversable_agent import ConversableAgent
Expand Down Expand Up @@ -564,7 +564,7 @@ def _finalize_speaker(self, last_speaker: Agent, final: bool, name: str, agents:
return agent if agent else self.next_agent(last_speaker, agents)

def _register_client_from_config(self, agent: Agent, config: Dict):
model_client_cls_to_match = config.get('model_client_cls')
model_client_cls_to_match = config.get("model_client_cls")
if model_client_cls_to_match:
if not self.model_client_cls:
raise ValueError(
Expand Down Expand Up @@ -599,14 +599,13 @@ def _register_custom_model_clients(self, agent: ConversableAgent):
if not self.llm_config:
return

config_format_is_list = 'config_list' in self.llm_config.keys()
config_format_is_list = "config_list" in self.llm_config.keys()
if config_format_is_list:
for config in self.llm_config['config_list']:
for config in self.llm_config["config_list"]:
self._register_client_from_config(agent, config)
elif not config_format_is_list:
self._register_client_from_config(agent, self.llm_config)


def _auto_select_speaker(
self,
last_speaker: Agent,
Expand Down

0 comments on commit d120cbe

Please sign in to comment.