A Next.js application that visualizes chat conversations with GPT in a tree-like graph structure.
- Node.js (v18 or higher)
- npm or yarn
- OpenAI API key
- Clone the repository:
git clone https://github.com/yourusername/treegpt.git
cd treegpt- Install dependencies:
npm install
# or
yarn install- Create a
.envfile in the root directory:
OPENAI_API_KEY=your_api_key_hereReplace your_api_key_here with your actual OpenAI API key.
- Start the development server:
npm run dev
# or
yarn dev- Open your browser and navigate to:
http://localhost:3000
(or the URL shown in your terminal)
TreeGPT (treegpt.app) is a new chat interface built for speed and ease of use, based on modeling conversations with LLMs as trees (DAGs) instead of linearly.
-
Tangential Conversations
- Traditional interfaces don't allow for branching conversations
- TreeGPT enables chat tangents with easy context control
-
Natural Language Search
- Search through chats using natural language descriptions
- Uses metadata embeddings and RAG lookup for better search results
-
Token Management
- Real-time token usage tracking and cost estimation
- Control over output length and context window
-
Model Selection
- Intelligent model routing based on heuristics and benchmarks
- Support for multiple providers (OpenAI, Anthropic, Gemini, DeepSeek)
-
Interactive Tree Visualization
- Mini-map showing the conversation tree
- Visual "context lineage" highlighting
- Node summaries and hover previews
-
Vim-like Keybindings
- Toggle between "chatting" and "viewing" modes [`]
- Tree navigation with [j] for up, [1-9] for edge selection
- Root navigation [r]
- Search functionality [/]
- Node editing [e]
- Node deletion [dd]
-
Model Selection Shortcuts
- 1 - Select Llama 3.1 (8B)
- 2 - Select Llama 3.3 (70B)
- 3 - Select Llama 4 Scout (17B)
- 4 - Select Qwen 3 (32B)
- 5 - Select DeepSeek Chat
- 6 - Select DeepSeek Reasoner
-
Advanced Architecture
- Tree-based data modeling for efficient search and caching
- LiteLLM integration for API and context management
- Support for personal API keys or subscription-based usage
-
Multi-Model Support
- Connect to various LLM providers using your own API keys
- Intelligent model routing between providers
- Comparative testing of different models
- Next.js 14
- React
- React Flow
- Tailwind CSS
- OpenAI API
- LiteLLM
- AWS Infrastructure