def METHOD_NAME(self) -> None:
    if self.template.type_name == "ConversationalRetrievalChain":
        # add memory
        self.template.add_field(
            TemplateField(
                field_type="BaseChatMemory",
                required=True,
                show=True,
                name="memory",
                advanced=False,
            )
        )
        # add return_source_documents
        self.template.add_field(
            TemplateField(
                field_type="bool",
                required=False,
                show=True,
                name="return_source_documents",
                advanced=False,
                value=True,
                display_name="Return source documents",
            )
        )
        self.template.add_field(
            TemplateField(
                field_type="str",
                required=True,
                is_list=True,
                show=True,
                multiline=False,
                options=QA_CHAIN_TYPES,
                value=QA_CHAIN_TYPES[0],
                name="chain_type",
                advanced=False,
            )
        )