update chat to template api changes