graph_utils
autogen.graph_utils.invert_disallowed_to_allowed
invert_disallowed_to_allowed
Invert the disallowed_speaker_transitions_dict to form the allowed_speaker_transitions_dict.
Start with a fully connected allowed_speaker_transitions_dict of all agents. Remove edges from the fully connected allowed_speaker_transitions_dict according to the disallowed_speaker_transitions_dict to form the allowed_speaker_transitions_dict.
Name | Description |
---|---|
disallowed_speaker_transitions_dict | A dictionary of keys and list as values. The keys are the names of the agents, and the values are the names of the agents that the key agent cannot transition to. Type: dict[str, list[Agent]] |
agents | A list of Agents Type: list[Agent] |
Type | Description |
---|---|
dict[str, list[Agent]] | allowed_speaker_transitions_dict: A dictionary of keys and list as values. The keys are the names of the agents, and the values are the names of the agents that the key agent can transition to. |