minimal chat function