def should_answer(self, inputs) -> Optional[AgentFinish]:
        """
        Let agent determines if it should continue to answer questions
        or that is the end of the conversation
        Args:
            inputs: Dict contains user query and other memorized contents

        Returns:
            None if should answer
            AgentFinish if should NOT answer and respond to user with message
        """
        output = None
        # check if agent should answer this query
        last_query = (
            inputs[constants.CONVERSATION_HISTORY].get_latest_user_message().content
        )
        if self.last_query != last_query:
            output = self.agent.should_answer(**inputs)
            self.last_query = last_query

        return output

        Let agent determines if it should continue to answer questions
        or that is the end of the conversation
        Args:
            inputs: Dict contains user query and other memorized contents

        Returns:
            None if should answer
            AgentFinish if should NOT answer and respond to user with message
        
autochain/chain/base_chain.py