Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature-request] Create a template model class #4

Open
DonnC opened this issue Jan 12, 2025 · 0 comments
Open

[feature-request] Create a template model class #4

DonnC opened this issue Jan 12, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@DonnC
Copy link
Owner

DonnC commented Jan 12, 2025

Create an engine template model class and a message type model class to make it easy to work with.

For example

class EngineTemplate:
    typ: str
    message: BaseTemplateMessage
    params: Dict
    routes: Dict
    # ...

Each template message type can inherit BaseTemplateMessage

class BtnMessage(BaseTemplateMessage):
    body: str
    buttons: List[str]
    title: Union[str, None]
    # ...

This will greatly simplify working with templates especially with Dynamic templates in hooks

@DonnC DonnC added the enhancement New feature or request label Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant