Media companies grapple with AI both inside and outside newsrooms