A combination of all three if I remember. He might have heard some of them (he was involved in the war, after all), but even in those cases it would be really hard for him to remember everything that was said. From what Sosin said, Thucydides wrote what he thought they should have said/would have been appropriate.