Welcome Frank
I'm going to go straight in with a fuel starvation issue there. If it's a 1997 it's highly likely you will be on a Zexel Injector Pump setup with a Hitachi MAF.
Pop your bonnet and check the behaviour of your plunger on top of your fuel filter housing with the engine running it should be "rock solid" and you shouldn't be able to depress it much, if you can, then you've got air in your fuel system which would ring true with my suspicions.
Another easy way to prove this would be to replace the rubber pipe from the fuel filter housing to the hard line across the bulkhead which is the feed to the IP. Once you've done this, remove your intercooler and then with a 17mm spanner (I think) undo each injector and turn the truck over a few revolutions and then nip them all back up again. Start the truck and again, check for any air bubbles in the clear pipe while running and check the fuel filter primer plunger again.
Did your fuel filter look quite new when you brought the truck? Swapping the filter and not priming the system back up correctly can cause the exact issues you are getting from experience.
If you're still having problems after that, I'd take a quick look at the Hitachi MAF as it's easy accessed from the top and cleanable with electrical contact cleaner.
I'm still saying fuel though, so I'd be leaving the MAF until last and checking the fuel lines back to the fuel tank and then the sender unit inside the tank for debris.
Good Luck :thumb2