-
Ever got frustrated when revising a chat history with LLM, the whole follow-ups got disappeared?
-
Ever tried to merge different threads with LLM into to one, so you copy-pasted all chats into a new chat to have better context?
-
Ever wondered "what if I can have multiple response with different input, and compare them", but bothered that the current chat interface is too linear?
Try out Gitchat! It loosly applies the git concept - you can merge, branch and modify the chat history. By treating messages as interconnected nodes in a flowchart-like structure.
It offers unprecedented flexibility in Large Language Model (LLM) interactions, allowing users to create branches, merge conversations, and rewire chat histories.
gitChat2.mp4
-
Non-linear Conversation Presentation
- Visualize conversations as nodes and edges in a flowchart structure
- Easily manage and manipulate conversation context
-
Context Replication
- Create new conversation branches by replicating existing nodes
- Avoid the need to copy/paste entire conversations as in traditional LLM interfaces
-
Flexible Context Management
- Route or unroute different conversation branches when creating new chats
- Easily control the context provided to the LLM for each interaction
-
Editable Conversation History
- Delete or modify LLM responses and user inputs
- Regenerate responses based on edited content
-
Cascade-style Response Regeneration
- Automatically regenerate all child LLM responses when modifying an earlier user input
- Maintain conversation coherence without resetting the entire thread
-
Interactive Node Management
- Add new user input or LLM response nodes
- Connect nodes to create new conversation flows
-
Context Menu Operations
- Replicate nodes to create parallel conversation branches
- Create connected nodes to extend conversations
-
Responsive Layout
- Zoom and pan functionality for easy navigation
- Minimap for an overview of the conversation structure
- Node.js (version 14 or later)
- npm (usually comes with Node.js)
-
Clone the repository:
git clone https://github.com/DrustZ/GitChat
-
Navigate to the project directory:
cd GitChat
-
For the webapp, install dependencies:
cd nodechat npm install
-
Start the webapp:
npm start
-
Do it again for the server (remember to create a .env for your openai key
OPENAI_API_KEY =
):cd server npm install npm start
-
Open your browser and visit
http://localhost:3000
to see the application.
-
Adding Nodes:
- Click the "Add User Input" or "Add LLM Response" buttons to create new nodes.
- Type your message in the input field at the bottom and click "Send" to add a new user input followed by an LLM response.
-
Editing Nodes:
- Double-click on a node to edit its content.
-
Creating Connections:
- Drag from the bottom handle of one node to the top handle of another to create a connection.
-
Replicating Nodes:
- Right-click on a node and select "Replicate Node" from the context menu.
-
Creating Connected Nodes:
- Right-click on a node and select "Create Connected Node" to add a new node connected to the selected one.
-
Deleting Connections:
- Click on a connection to delete it.
-
Regenerating Responses:
- Edit a user input node and all subsequent LLM response nodes will automatically regenerate.
-
Navigation:
- Use the mouse wheel to zoom in and out.
- Click and drag on the background to pan the view.
- Use the minimap in the top-right corner for quick navigation.
Contributions are welcome! Please feel free to submit a Pull Request.
-
Non-linear chat idea inspired by the Sensecape project. Check out their video!
-
Also, got inspiration from discussion with Xingyu Bruce Liu
-
This project uses React Flow for the flowchart functionality.