Erratic RPMs, especially in hot weather is commonly caused by a failing ignition module (on the side of the distributor). Usually, it will start out intermittantly, and if you shut the car off and let it cool down, the idle will smooth out. Then when it heats up again, it will start running...