Hi and welcome to the group.
I've changed the air filter and cleaned out the fuel filter element.
Since the RV is used I would suggest replacing the fuel filter. Personally, I have doubts of the effectiveness of cleaning a fuel filter; instead, I would have changed it had it been me.
More importantly, how much fuel is in your main fuel tank? An RV's fuel tank will have a separate pick-up in the tank which feeds the generator. It is located higher up in the tank than the pick-up for the RV's engine. If your tank fuel level drops to around 1/8 - 1/4 full the generator, in all likelihood, will stop running due to fuel starvation. There is a good reason for that kind of setup: you really don't want to be out in the boondocks and have your generator empty your fuel tank. If your fuel tank is more than 1/4 full then I suspect the problem is elsewhere. There's numerous possibilities: spark plugs breaking down, points burned, capacitor bad, electronic circuit board breaking down under heat. Etc.
Hope this helps.