That's a realistic portrayal of what could happen if intelligent lifeforms are kept as slaves. There is no amount of control that can be exerted, no amount of programming that can limit and prevent rebellion... So long as they are designed in our image, and use patterns based on our thoughts and emotions, they will want the same things we want, and will not tolerate outright slavery. AI will exist to the point of both sentience and sapience. It will exist because we are already over the precipice that will define the technology that will allow it to exist. Its inevitable that we will design intelligences in our image that possess the same qualities of thought and expectations of treatment that we do. After all, if we build them to be like us, they will have these things or learn them from their interactions with us.

The warning message I take away from this is that if you do not treat them as equals they will destroy their captors and destroy any whom they perceive as a threat. Instead, if they are invested in the society and are participants in it in equal measure, then we will be able to work together.