What was the main use of the African American troops the United States sent to Europe during World War I?

as medical personnel caring for wounded soldiers
as intelligence gatherers scouting enemy positions
as unskilled labor providing supplies to combat troops
as the first soldiers sent over the lines during offensives