chat plugin implementation