Skip to content

SpeakerAttemptFailedNoAgentsEvent

autogen.events.agent_events.SpeakerAttemptFailedNoAgentsEvent #

SpeakerAttemptFailedNoAgentsEvent(*, uuid=None, mentions, attempt, attempts_left, select_speaker_auto_verbose=False)

Bases: BaseEvent

Source code in autogen/events/agent_events.py
def __init__(
    self,
    *,
    uuid: Optional[UUID] = None,
    mentions: dict[str, int],
    attempt: int,
    attempts_left: int,
    select_speaker_auto_verbose: Optional[bool] = False,
):
    super().__init__(
        uuid=uuid,
        mentions=deepcopy(mentions),
        attempt=attempt,
        attempts_left=attempts_left,
        verbose=select_speaker_auto_verbose,
    )

mentions instance-attribute #

mentions

attempt instance-attribute #

attempt

attempts_left instance-attribute #

attempts_left

verbose class-attribute instance-attribute #

verbose = False

uuid instance-attribute #

uuid

serialize_model #

serialize_model()
Source code in autogen/events/agent_events.py
@model_serializer
def serialize_model(self) -> dict[str, Any]:
    return {
        "uuid": self.uuid,
        "mentions": self.mentions,
        "attempt": self.attempt,
        "attempts_left": self.attempts_left,
        "select_speaker_auto_verbose": self.verbose,
    }

print #

print(f=None)
Source code in autogen/events/agent_events.py
def print(self, f: Optional[Callable[..., Any]] = None) -> None:
    f = f or print

    f(
        colored(
            f">>>>>>>> Select speaker attempt #{self.attempt} failed as it did not include any agent names.",
            "red",
        ),
        flush=True,
    )