E2E-AFG: An End-to-End Model with Adaptive Filtering for Retrieval-Augmented Generation