Talking to a gooey blob through GPT-4

This is a continuation of the following post:

Talking to RPG characters through GPT-4

I have spent a few hours today implementing vector databases in my repository, which would hold the memories of the agents that may end up involved in these AI-related experiments. Once that was done and I could query those databases for relevant memories, I rewrote the class that handles the dialogue between two or more agents.

To test if it worked properly, I created the vector databases for the two characters of my ongoing novel that have kept me occupied for however long the current sequence has lasted: Leire and Alberto the blob (here’s the so far latest chapter where they appear). I wrote Leire’s dialogue when I was asked, while GPT-4 acted out Alberto’s part based on his memories and character summary.

First of all, I screwed up something in the code; I was prompting GPT-3.5 to determine who was the next speaker, but at times the AI decided that the same person who had just talked should produce the next line of dialogue. Although I fixed it later, the effects of that bug are present in the following dialogue.

First attempt at player-AI dialogue

Alberto: Leire, you need to listen to me! This is no time for petty office squabbles. The reality-altering contraption is going to collapse reality if we don’t act. I know I’m a wall-wide, gooey, stinking blob now, but you knew me before… as a co-worker, as a friend. We need to work together to save the universe. So, how about it?

Leire: Friend? I was never your friend. You were the prick who kept tangling Jacqueline and I into arguments about women because you hated your ex-wife, who cheated on you and left you to rot.

Alberto: Ouch, that’s harsh, Leire. But you’re right. I was a prick. Still am, probably. But this is bigger than my past mistakes or my… gooey present. We need to put aside our differences, because if we don’t, there won’t be any reality left to argue in.

Alberto: Look, Leire, I get it. I’ve always been a pain in the ass. But right now, we’re facing an existential threat, and it’s bigger than any office drama or personal grudge. Are you really going to let the universe crumble because you can’t stand working with me?

Alberto: Hell, Leire, I don’t blame you for not wanting to work with me. I wouldn’t want to work with me either! But this isn’t about me or you, it’s about everything and everyone. We’re the only ones who understand the contraption. We’re the only ones who can fix it. So, are we going to do this or just keep arguing until there’s nothing left to argue about?

Alberto: Fine, you don’t see me as a friend. You think I’m a prick. But Leire, consider this – we have a broken contraption that threatens to implode the universe. And guess what, we’re the only ones who can fix it. Sure, we don’t have to like each other, but we have to work together. So, what do you say? Are you in or are you out?

Leire: I think I’d rather go home and snuggle up to my beloved Jacqueline, the most buxom mommy in the world.

Alberto: Leire, I understand your reluctance, but sit with this thought – If the universe implodes, there won’t be a home or a Jacqueline to go back to. We’re in a pickle and as much as it stinks, we’re the only ones who can fix it.

Leire: Holy crap, I think you are right. If the universe ends, my girlfriend will die!

Leire: I don’t want my mommy Jacqueline to die! I want to snuggle up to her forever and ever!

Alberto: That’s the spirit, Leire! We’re not just saving the universe, we’re saving Jacqueline too. Let’s get to work and make sure your eternal snuggles remain a reality.

Leire: Alright, I guess I can help you even though you have become an utterly repulsive and vomitive blob. What do I have to do again?

Alberto: Thank you, Leire. I know I’m not the easiest blob to work with. As for what needs to be done, we need to reverse engineer the contraption. We have to figure out how to stabilize the reality-altering function before it’s too late.

Leire: How about I reverse engineer your ass with a shovel?

Alberto: Ha, good one, Leire. But let’s save the shoveling for after we’ve saved the universe, okay? Right now, we need every brain cell focused on the contraption.

Leire: Well, tell me where that damned machine is located and I’ll get right to reverse engineering it or whatever.

Leire: Are you listening to me or are you just oozing?

Leire: Hey, wake up, blob!

Alberto: Easy, Leire, I’m not asleep, just… processing. The contraption is in the old lab at the sub-basement. You’ll need the access code, though, and that’s… complicated.

Alberto: Complicated because it’s not a simple number code. It’s a sequence of actions. You have to press the third button from the left, turn the red dial clockwise, then press the second button from the right. And be careful, Leire. The lab… it’s not a safe place.

Alberto: There are… things in there. Things that shouldn’t be. I can’t go with you, but I’ll be in your ear, guiding you through. Just remember, Leire, no matter how bad it gets, we’re doing this for Jacqueline. For the universe.

Alberto: And remember, don’t let your fear or disgust get the better of you. We’ve got a universe to save.

Alberto: Remember, Leire. Third button from the left, red dial clockwise, second button from the right. And whatever you see in there, stay focused. It’s for Jacqueline. It’s for the universe. And… thank you, Leire.

Alberto: Just remember, Leire. Don’t let the office politics distract you. We’re not here to win employee of the month. We’re here to save the universe. So, get your game face on and let’s do this.

Alberto: Leire, I know I’m a sight for sore eyes, but focus! Remember the sequence: third button, red dial, second button. And don’t let the horrors in the lab distract you. Do it for Jacqueline. Do it for the universe. And… thank you, Leire.

Alberto: And remember, Leire, it’s not just about saving the universe anymore. It’s about putting things right. Restoring what’s been lost. Restoring… me. So press that third button, turn the dial, press the second button, and let’s save the bloody universe!

Alberto: Leire, I won’t sugarcoat it. The lab is a hellhole. But it’s a hellhole we need to dive into if we’re going to put things right. So, remember, third button, red dial, second button. And remember, we’re not just saving the universe, we’re saving ourselves. Now, stop staring at my blobby form and let’s get to it!

Alberto: Enough dawdling, Leire! Third button, red dial, second button. Swallow your fear, ignore the stench, and let’s save the damn universe! And for the love of everything, stop staring at me like I’m some grotesque spectacle!

Leire: Alright, alright, I’m going. Stop talking to me.

GPT-4 is fantastic at making shit up when it doesn’t have enough information, which was a horrible pain before OpenAI added the option to introduce functions into the equation. For example, the AI chose to stop the dialogue right after my last utterance as Leire, thanks to the function ‘stop_dialogue’ I passed along. Now I just appreciate the AI’s creativity.

Second attempt at player-AI dialogue

Alberto: Leire, by the festering sores of my eyeballs, you need to listen to me! The professor’s contraption is on the verge of causing a dimensional collapse. You’re the only one who can stop it, dammit!

Leire: (chuckling) By the festering sores of your eyeballs! That’s a good one.

Alberto: This isn’t a bloody joke, Leire! We’re on the brink of a reality collapse! I didn’t morph into this grotesque, goo-oozing blob for fun. You need to stop the contraption before it’s too late!

Leire: I’d rather just stick around in the office and listen to you complain about the end times.

Alberto: Oh, fine! Just sit there and gawk at me. You’ll be laughing on the other side of your face when the universe implodes and I’m the only blob left!

Leire: What? Are you expecting to survive if the universe ends? How would that work?

Alberto: I don’t bloody know, Leire! I didn’t ask to become a multi-dimensional blob, did I? But apparently, in this state, I exist beyond the normal confines of space and time. So yes, I might survive. But that’s beside the point, dammit! We need to stop this from happening in the first place!

Leire: Crap, you are making enough sense. I don’t want the universe to end if that means that you would survive!

Alberto: That’s the spirit, Leire! Now, let’s get to work and stop this damn reality collapse before I become the last bloody thing left in existence!

Leire: Alright, I guess I can spare some time from occupying my overtime productively to listen to a putrid blob who keeps oozing his goddamn black goo everywhere. I hope I’m not the one who will end up cleaning up this shit.

Alberto: Well, you better get used to it, Leire! Because if we don’t stop this, the whole damn universe will be oozing with this black goo. Now, let’s cut the crap and get to work!

Leire: Wait a second, the universe will start oozing with a similar black goo? Is that a consequence of the tears ripped open in reality?

Alberto: Yes, that’s exactly it! The black goo is a byproduct of the contraption’s reality-altering process. It’s the universe’s way of trying to patch up the holes in reality. If we don’t act soon, there’ll be nothing left but black goo and blobs!

Leire: So the tar-black goo is like caulk for the holes in reality? I didn’t come up with that notion.

Alberto: No, you didn’t, Leire, but it’s a good analogy. The universe is trying to heal itself, but the goo is just a temporary fix. We need to find a way to shut down the contraption and close the tears for good!

Leire: First of all, stop shouting at me. I already have enough with your stench and the horrifying sight of your slimy bulk.

Alberto: Fine, Leire, I’ll try to keep my volume down. But we don’t have time for your disgust. We need to focus on the task at hand. Now, did you understand the severity of the situation or do I need to explain it again?

Leire: I’ll pretend that I understood, because I don’t want you to explain it to me again.

Alberto: Good, you’re getting the hang of it, Leire! Now, let’s get moving and find that damn contraption before everything turns into a black goo nightmare.

Leire: I need to finish programming a function of my Python program, though. I’ll probably spend an hour or so refactoring it as well.

Alberto: An hour?! We don’t have that kind of time, Leire! Your petty coding can wait. The universe can’t!

Leire: Petty coding? What the hell do you think pays my bills? Have some respect for people’s trades.

Alberto: Leire, I respect your work, truly. But right now, we have a bigger task at hand. The universe is on the brink of collapse. I promise, we’ll get back to your coding as soon as we save reality. Now, can we please focus on the contraption?

Leire: What contraption was that again?

Alberto: The reality-altering contraption, Leire! The one that turned me into this… this gooey nightmare! We need to find it and shut it down before it’s too late!

Leire: Well, where the hell is it?

Alberto: It’s in the professor’s old lab, hidden behind a bookshelf. Trust me, I know it sounds crazy, but I’ve been there. We need to go now, Leire!

Leire: By all means, if you can lower yourself from that wall and slink your way through the doorway, I’d love to see it. You first.

Alberto: Trust me, Leire, if I could get my blobby self off this wall and through that door, I would have done it already. But I can’t! That’s why I need your help. We need to save the universe together!

Leire: Then don’t say ‘we need to go’ if you aren’t even going to move from your position. I’m the one who will spend energy moving around while you ooze the rest of the evening on that wall.

Alberto: Look, Leire, I know this is a lot to take in, and I’m sorry I can’t physically help. But, I can guide you. I can tell you exactly where to go, what to do. I know I’m a blob, but I’m a blob with knowledge! So, are you in, or are you going to let the universe collapse?

Leire: I think I need to take a nap first. Shut up for a while.

Alberto: Fine, take your nap. But remember, every moment we waste, the universe edges closer to collapse. When you’re ready to save reality, you know where to find me. Oozing away on this wall.

Leire: Are you going to stare at me while I sleep? Can’t you sink your dozens of eyeballs in your gooey bulk?

Alberto: I’d say I’m offended, but honestly, you’re right. I’ll try to keep my eyes… submerged. Just remember, Leire, the fate of the universe rests in your hands… and my eyes. Sleep well.

Pretty cool. You can play around with the code, if you know your way around Python, GitHub and the OpenAI API, by cloning the repository: RPGs-with-LLMs. It’s far from finished, though, and you need a paid subscription to OpenAI.

One thought on “Talking to a gooey blob through GPT-4

  1. Pingback: Two characters of my novel speak to each other through GPT-4 – The Domains of the Emperor Owl

Leave a comment