In the presence of `NH_3` the 3d electrons pair up leaving two d-orbitals empty to be involved in `d^(2)sp^(3)` hybridisation forming inner orbital complex in case of `[Co(NH_3)_6]^(3+)`. In `Ni(NH_3)_6^(2+)`, Ni is in `+2` oxidation stale and has `d^(8)` configuration, the hybridisation. Thus there is no unpaired electron.