Thanks to visit codestin.com
Credit goes to GitHub.com

Skip to content

An interactive Roleplay Group Chat simulation powered by Streamlit, LangChain, and Google Gemini 2.5. Features a dynamic ReAct Agent that orchestrates banter between multiple anime/fantasy characters, allowing them to interrupt each other, use web search, and interact with the user ("Su Yuan") in a chaotic, lively environment.

Notifications You must be signed in to change notification settings

viochris/chat-group

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

💘 Myriad Realm Harem (AI Group Chat)

Python Streamlit LangChain Gemini Status

⚠️ Development Status: This project is currently Experimental (Work in Progress). The prompt engineering and group interaction logic are still being fine-tuned for stability. Expect occasional hallucinations or repetitive banter.

📌 Overview

Myriad Realm Harem is an interactive Roleplay Group Chat simulation powered by Google Gemini 2.5 Flash.

Unlike standard 1-on-1 chatbots, this application simulates a chaotic "Group Chat" environment. You play as Su Yuan (The Master), and the AI orchestrates a roster of anime/fantasy characters who interact not only with you but also with each other—arguing, teasing, and interrupting in real-time.

🌟 Starting Roster (Default)

The simulation launches with these pre-loaded personalities, featuring a mix of archetypes to ensure chaotic interactions:

Character Origin Archetype / Trait
Makima Chainsaw Man Domineering, Control Freak, Manipulative
Yor Forger Spy x Family Deadly Assassin, Socially Awkward, Motherly
Esdeath Akame ga Kill Sadistic General, Obsessively in Love, Survivalist
Albedo Overlord Yandere, Obsessed Overseer, Hates other women
Mikasa Ackerman Attack on Titan Stoic Bodyguard (Kuudere), Overprotective
Rias Gremory High School DxD Noble Princess, Seductive, Caring Onee-san
Kaguya Shinomiya Love is War Tsundere Genius, Proud, Refuses to confess
Shinobu Kocho Demon Slayer Passive-Aggressive, Smiling Tease, Poison User
Mai Sakurajima Bunny Girl Senpai Mature, Straightforward, Emotional Anchor
Megumin Konosuba Chuunibyou, Loud, Explosion Maniac

✨ Key Features

🎭 Dynamic Group Dynamics

  • Multi-Persona Simulation: The AI acts as a "Game Master," generating dialogue for multiple characters (e.g., Makima, Yor Forger, Esdeath) in a single response.
  • Inter-Character Banter: Characters are programmed to reply to each other, creating a lively and chaotic atmosphere rather than a static Q&A session.

🧠 ReAct Agent Architecture

Powered by LangChain, the system uses a Reasoning + Acting (ReAct) framework:

  • Visual Thought Process: View the agent's logic (Thought -> Action -> Observation) via the StreamlitCallbackHandler to see how it decides who speaks next.
  • Web Search: The group has access to DuckDuckGo to fetch real-world data (e.g., checking the weather or news) during the roleplay.

🛠️ Customization & Memory

  • Roster Expansion: Use the sidebar to create custom characters (Waifus/Husbandos) and instantly add them to the active chat.
  • Contextual Memory: Uses ConversationSummaryMemory to remember past interactions and maintain long-term context.

🎨 Immersive UI

  • Thematic Styling: Custom CSS providing a "Pink/Purple" cultivation aesthetic with glowing text and gradient buttons.

🛠️ Tech Stack

  • LLM: Google Gemini 2.5 Flash (via langchain-google-genai).
  • Framework: Streamlit.
  • Orchestration: LangChain (Agents, Tools, Memory).
  • Search Tool: DuckDuckGo Search Run.

📦 Installation

  1. Clone the Repository

    git clone https://github.com/viochris/chat-group.git
    cd Myriad-Realm-Harem
  2. Install Dependencies

    pip install -r requirements.txt
  3. Run the Application

    streamlit run app.py

🚀 Usage Guide

  1. Get API Key: Obtain a free API Key from Google AI Studio.
  2. Launch: Enter the API key in the sidebar.
  3. Chat: Type a message as "Su Yuan".
    • Example: "I'm tired from cultivation today." -> Watch the characters fight over who comforts you.
  4. Add Characters: Open the "📝 Create Custom Character" expander in the sidebar to add new members to the group temporarily.

🔧 Advanced: Changing the Default Roster

To permanently change the starting characters without adding them manually every time:

  1. Open the file function.py in your code editor.
  2. Locate the dictionary st.session_state.all_character inside the init_state() function.
  3. Simply edit the names and descriptions in the code to your own preferred characters!

⚖️ Disclaimer & Legal Warning

1. Experimental Prototype Status This application is a Proof-of-Concept and Experimental Prototype. It pushes the boundaries of prompt engineering to simulate a chaotic "Group Chat" using a single LLM agent.

  • Expect Unpredictability: The characters might occasionally break persona, mix up speakers, or repeat themselves.
  • Logic Breaks: The "Game Master" logic is complex; occasional disruptions in conversational flow are expected.

2. Parody & Fan Content This application involves characters based on existing fictional works (e.g., Esdeath from Akame ga Kill, Yor Forger from Spy x Family). These characters are used strictly for non-commercial, educational, and parody purposes to demonstrate AI persona steering capabilities. All rights to the original characters belong to their respective creators and publishers.

3. AI Generation & Safety The responses are generated by a Large Language Model (Google Gemini).

  • Hallucinations: The AI may invent facts or deviate from canon lore.
  • Safety Filters: This app utilizes Google's safety settings. Responses involving explicit content, hate speech, or extreme violence may be blocked by the API provider. Users are advised to interact responsibly.

4. Just for Fun This project was created solely for entertainment and hobby purposes. It is NOT intended to be a serious, commercial, or scalable product. It is simply a fun experiment to test the limits of AI roleplay capabilities.


Author: Silvio Christian, Joe "The myriad realms await your command."

About

An interactive Roleplay Group Chat simulation powered by Streamlit, LangChain, and Google Gemini 2.5. Features a dynamic ReAct Agent that orchestrates banter between multiple anime/fantasy characters, allowing them to interrupt each other, use web search, and interact with the user ("Su Yuan") in a chaotic, lively environment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages