Pickup that won't run when hot

1989 TK THAT WILL RUN OK UNTIL YOU TURN OFF THE SWITCH, THEN WON’T RUN AGAIN (WILL START)UNTIL IT IS COMPLETELY COOLED. CAN TAKE OFF THE GAS FILTER AND BLOW OUT AND MOST OF THE TIME WILL START AND RUN, THAT IS UNTIL YOU TURN OFF THE SWITCH AND THEN IT IS BACK TO THE START. HELP!!! FRED

Your caps are stuck on.

89 was FI non carb, right?

Removing the gas filter is a clue, I think, because it relieves pressure after it has been running. Time (ie ‘cooling down’) likely bleeds the pressure off.
Blowing your filter out may not do a thing: If it was indeed clogged, it wouldn’t start at all.

I’d check your fuel pressure. It could be your fuel pressure regulator.

It may be vapor locking due to weak fuel pressure. Have the fuel pressure checked. Or pour cold water over the fuel line next time and see if it starts.