Update chat.py

Added in causal ordering