The company aims to reduce costs and gain more control over the technology powering its artificial intelligence systems.