def METHOD_NAME(self) -> None:
    # chat history should have another way to add common field?
    # prevent adding incorect field in ChatMessageHistory
    base_message_classes = ["BaseEntityStore", "BaseChatMessageHistory"]
    if any(base_class in self.base_classes for base_class in base_message_classes):
        return
    # add return_messages field
    self.template.add_field(
        TemplateField(
            field_type="bool",
            required=False,
            show=True,
            name="return_messages",
            advanced=False,
            value=False,
        )
    )
    # add input_key and output_key str fields
    self.template.add_field(
        TemplateField(
            field_type="str",
            required=False,
            show=True,
            name="input_key",
            advanced=True,
            value="",
        )
    )
    if self.template.type_name not in {"VectorStoreRetrieverMemory"}:
        self.template.add_field(
            TemplateField(
                field_type="str",
                required=False,
                show=True,
                name="output_key",
                advanced=True,
                value="",
            )
        )