Neural narratives in Python #22

I recommend you to check out the previous parts if you don’t know what this “neural narratives” thing is about. In short, I wrote in Python a system to have multi-character conversations with large language models (like Llama 3.1), in which the characters are isolated in terms of memories and bios, so no leakage to other participants. Here’s the GitHub repo, that now even features a proper readme.

At the end of the previous part, we left our jaded protagonist boxing an eldritch horror while his long-dead teenage lover ran for her life.

I had no clue where Cassidy’s portal would lead, or even if it would work. I organized a session with my Writers’ Room to put together the following scene, that involved generating a couple of new characters.

Those noises are artifacts that rarely happen when generating voices. It’s odd that it happened three times in this segment, but they seemed to fit the eeriness, so I left them in. I apologize for minor errors such as using “his” when referring to Elizabeth. My brain is mostly mush at this point.

When this scene started, I had only included the main team in the dialogue, but I wanted Gideon’s deceased wife and the young version of their daughter to show up in the middle of the conversation. I had no such system implemented, so I wrote it in: a new collapsible section in the chat page that if there are characters present in the same place who aren’t involved in the dialogue, you can simply add them, and they’ll be included in the prompts to the large language model from then onwards. It was surprisingly easy to do, which I suppose is a testament to how mature the app is at this point.