Preheat oven to 180°C (350°F). Grease or line a 20x20 cm baking pan.
Cook the sweet potato. Microwave, bake or boil.
In a large bowl, mix mashed sweet potato, eggs, maple syrup (or honey), and vanilla extract until smooth.
Add gluten-free flour, cacao powder, baking powder, and salt. Mix until just combined.
Fold in dark chocolate chips if using.
Pour half the batter into the prepared pan. Add spoonfuls of peanut butter if using, then top with remaining batter. Swirl gently if desired
Bake for around 30-40 minutes. The center may still look slightly gooey but will firm up as it cools.
Allow to cool before slicing for best texture.