A man trapped in the stairwell of a burning building in Sydney's east has been freed, fire authorities say.

The blaze on the roof of an eight-level residential block at Centennial Park was contained on Thursday afternoon, Fire and Rescue NSW Superintendent Ian Krimmer told ABC radio.

A man had been trapped in the stairwell by smoke, he said.

"He's been helped down by firefighters and brought to safety without any injury," he said.

Timber decking on top of the building had been alight, but the cause was not yet known.

Mr Krimmer said 50 firefighters attended the blaze due to the sweltering weather, as temperatures reached more than 37C in the city.

"Due to the climatic conditions today we've been responding with what we call a heavy weight of attack to fire calls," he said.

Earlier, about 1000 people were evacuated from buildings in Sydney's CBD over what turned out to be nothing more than smoke from a diesel generator.

Firefighters were called to Hunter Street after 11.30am (AEDT) on Thursday to find smoke billowing from a building.

A fire service spokeswoman told AAP that crews assumed it was a fire but later found a diesel generator was causing the smoke.

She also said two buildings including a 20-storey office tower were evacuated.

"It ended up being about 1000 (people) because they had to evacuate the 20-storey office building," she said.

Six fire crews as well as police and ambulance personnel attended the scene.