Prepare the sweet potatoes by peeling, chopping, and boiling until tender, then mash until smooth.
Mix the dry ingredients: flour, cocoa powder, baking powder, baking soda, and salt in a large bowl.
Combine the wet ingredients: mashed sweet potatoes, vegetable oil, granulated sugar, brown sugar, eggs, and vanilla extract until smooth.
Gradually add the dry mixture to the wet mixture, alternating with milk, and fold in chocolate chips if using.
Preheat oven to 350°F, grease a 9-inch round cake pan, pour in the batter, and bake for 30-35 minutes.
Allow the cake to cool in the pan for 10 minutes before transferring to a wire rack to cool completely.