Waive lighted branches up the chimney as the smoke will make them retreat.
Open flue first!!
There is a wasp spray that will spray up to 10 feet or more so you might try this if the wasps are hard to get at.
We’ve used the wasp spray mentioned above that sprays far. It removed them from our chimney