Right now, we're making AI ghosts... Basically, you take text messages from your dead friend or relative and feed it into the AI and *poof* you're talking to your dead spouse or Mom again. The more info. you feed the AI, the more real it is and you can believe that it will get to the point where your conversations with the AI will go exactly how they'd have gone with the dead person (at least at who they were up until the moment of death). The only thing it won't account for is how the years might've changed them -- births, deaths, friendships, job changes etc. But it will be like talking to them as you remember which is exactly what most people want.
The issue I have with this is that people won't move on from loss. It will help a lot of people if it's used therapeutically - for example, I lost my dad when I was a baby but because he was in Vietnam he sent letters to my Mom and a ton of his family members. AI could take those letters and give me an opportunity to speak with him and if that was done with say, a therapist, it would probably be super beneficial for me and my brother. BUT the dark side of that is a widow or child who might not be able to move on from the loss and then develops and unhealthy relationship with the AI.
Star Trek is once again predicting the future though. Holodecks were initially invented for therapy - grief, ptsd, and treatment for other things. DS9 showed how a character got lost in that and didn't want to leave it behind.