Moved chat json creating to the CompositeChat class.