Is it better to repair or replace AC unit?

Is it better to repair or replace AC unit?