The first of these is particularly important. In this respect Homer and Herodotus are very similar. Both authors composed extended speeches for their major characters to deliver at important points in the narrative and both expected their audience to see these speeches as something more than just the product of the writer's free imagination. The audience would not necessarily believe that the contents of these speeches were word for word, but that there was an element of truth in the words spoken. Direct speech in Herodotus runs from formal oratory in set-piece debates, to informal conversation, or even memorable remarks.
All types are of some importance.
Formal speech was something that the Athenians enjoyed for their own sakes and they would pay fortunes to hear. But Herodotus includes examples of such speeches for more than simply literary pleasure. The constitutional debate Sosicles of Corinth on tyranny Herodotus has little or no evidence for any of these above conversations. The speeches do have purposes, the most important for the first is to analyze Xerxes's chances of success with the benefit of hindsight, at the same time as setting the scene. For a Greek audience, they make for more impact in Artabanus's moth than they would if Herodotus stated his opinions.