updated chat sample according to sdk updates