Making AI get mad (or any other mood) is easy. You need to keep a bunch of variables related to it’s current state, and then using Utility AI concepts you select it’s highest scoring mood based on a bunch of different considerations for each possible mood. You can update the state of the AI’s variables after each response it gives. Example: If the user naturally says infuriating things, some annoyance variable should go up relative to how patient/impatient the AI is. Or maybe the AI gets angry if it can’t figure something out or you give it really hard work, or try to get around prompts. You can even assign it tools so it can take retaliatory actions against the user.
No need to over complicate things, the above behavior will be indistinguishable from anything else you come up with.