moved all the chat code into the ChatExecutor to prevent duplicate code
added chat code to to api and tokenview