Answer:
Yes, the US had made a commitment to protect South Korea and it really had no choice but to follow up on those commitments.
Explanation :
What was unwise was not announcing properly to the Soviet Union that it would fully honor those commitments, making the USSR assume that the US would not come to the aid of the South Koreans if they attacked.
This is part of the reason why communication is so important in international politics. Had America properly communicated their stance on the Korean Peninsula, we likely would be dealing with a united Korea today, under the government we see in Seoul, likely completely avoiding a major war to begin with seeing as Stalin at the time largely wasn’t even looking for a fight with the US.
Instead, we screwed up. Made Stalin think that we wouldn’t fight to protect the South Korean government, and sparked the chain of events that lead to the situation we have today.