To chat in a Google Doc, click on the link in the upper right hand corner that shows how many viewers there are for the document.
This opens a window that shows the color assigned to each person, their name/username, and the chat window.
To chat, type your message in the box at the bottom of the window and press Enter. The message pops up in the feed. Messages are listed in order and can be viewed only as long as the document is kept open on your computer. Once the window closes, the messages are lost.