Skip to content

[Feature] Simplify the custom event definition. #424

@wenjin272

Description

@wenjin272

Search before asking

  • I searched in the issues and found nothing similar.

Description

Currently, if user want to send/receive custom events, they must define a new event type, like

class MyEvent(Event):
    """User custom event."""
    field1: str
    field2: int

This can be somewhat cumbersome at times.

To simplify the definition of Agent, we want to support user only declare the identifier, like:
ctx.send_event(identifier="MyEvent", field1="test", field2=1)

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature[Issue Type] New features or improvements to existing features.priority/majorDefault priority of the PR or issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions