has_self_loops

has_self_loops(allowed_speaker_transitions: dict[str, list[Agent]]) -> bool

Check if there are self loops in the allowed_speaker_transitions.

Parameters:
NameDescription
allowed_speaker_transitionsA 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

Type: dict[str, list[Agent]]
Returns:
TypeDescription
boolTrue if there are self loops in the allowed_speaker_transitions_Dict.