Novak Djokovic thanked his team-mates and coaching staff, after the world number two steered Serbia into the ATP Cup final with victory over Russia's Daniil Medvedev.