Generative Text (Incrementing Text) in Swift

I have developing Trip’s Itineraries using GPT-3.5, I can’t figure it out how can I achieve Incrementing Text or generative text just like ChatCGPT Web,
And I also want to differentitate between text and heading as well as bullet points so I make them my way