Branching your conversations with LLM
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.
https://github.com/user-attachments/assets/f4d123f3-4b2d-4c8d-94b2-034a1acaa00d
Non-linear Conversation Presentation
Context Replication
Flexible Context Management
Editable Conversation History
Cascade-style Response Regeneration
Interactive Node Management
Context Menu Operations
Responsive Layout
Clone the repository:
git clone https://github.com/DrustZ/GitChatNavigate to the project directory:
cd GitChatFor the webapp, install dependencies:
cd nodechat
npm installStart the webapp:
npm startDo it again for the server (remember to create a .env for your Anthropic key ANTHROPIC_API_KEY = ):
cd server
npm install
npm startThe server reads these variables from server/.env:
| Variable | Required | Description |
|---|---|---|
ANTHROPIC_API_KEY |
Yes (default provider) | Your Anthropic API key |
ANTHROPIC_MODEL |
No | Claude model to use. Defaults to claude-sonnet-5; use claude-haiku-4-5-20251001 for a cheaper/faster option or claude-opus-5 for harder reasoning |
LLM_PROVIDER |
No | anthropic (default) or openai |
OPENAI_API_KEY |
Only if LLM_PROVIDER=openai |
Your OpenAI API key, for the original OpenAI path |
Open your browser and visit http://localhost:3000 to see the application.
Adding Nodes:
Editing Nodes:
Creating Connections:
Replicating Nodes:
Creating Connected Nodes:
Deleting Connections / nodes:
Regenerating Responses:
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.
No open issues yet, or sync has not completed.