{"id":42463959,"url":"https://github.com/tron4x/neuronhub","last_synced_at":"2026-01-28T09:33:04.042Z","repository":{"id":334517446,"uuid":"1140541052","full_name":"tron4x/neuronhub","owner":"tron4x","description":"AI Multi-Model Management Platform","archived":false,"fork":false,"pushed_at":"2026-01-25T21:25:37.000Z","size":5279,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-25T22:54:05.189Z","etag":null,"topics":["bullmq-processing","nextjs","nodejs","ollama","postgresql","redis"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tron4x.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-23T12:23:28.000Z","updated_at":"2026-01-25T21:25:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tron4x/neuronhub","commit_stats":null,"previous_names":["tron4x/neuronhub"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/tron4x/neuronhub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tron4x%2Fneuronhub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tron4x%2Fneuronhub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tron4x%2Fneuronhub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tron4x%2Fneuronhub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tron4x","download_url":"https://codeload.github.com/tron4x/neuronhub/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tron4x%2Fneuronhub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28843922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T07:39:25.367Z","status":"ssl_error","status_checked_at":"2026-01-28T07:39:24.487Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bullmq-processing","nextjs","nodejs","ollama","postgresql","redis"],"created_at":"2026-01-28T09:33:03.960Z","updated_at":"2026-01-28T09:33:04.030Z","avatar_url":"https://github.com/tron4x.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"public/bot.png\" alt=\"NeuronHub Logo\" width=\"120\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eNeuronHub 🧠\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eMulti-Model Intelligence\u003c/strong\u003e — Your Central LLM Management Platform\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/version-1.3.2-blue?style=flat-square\" alt=\"Version\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/license-AGPL--3.0-blue?style=flat-square\" alt=\"License\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/build-passing-brightgreen?style=flat-square\" alt=\"Build Status\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Node.js-22+-339933?style=flat-square\u0026logo=node.js\u0026logoColor=white\" alt=\"Node.js\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Next.js-16.1-black?style=flat-square\u0026logo=next.js\" alt=\"Next.js\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/React-19.2-61DAFB?style=flat-square\u0026logo=react\u0026logoColor=black\" alt=\"React\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/TypeScript-5.9-3178c6?style=flat-square\u0026logo=typescript\u0026logoColor=white\" alt=\"TypeScript\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Tailwind_CSS-3.4-06B6D4?style=flat-square\u0026logo=tailwindcss\u0026logoColor=white\" alt=\"Tailwind CSS\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Prisma-7.2-2D3748?style=flat-square\u0026logo=prisma\" alt=\"Prisma\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/PostgreSQL-16-4169E1?style=flat-square\u0026logo=postgresql\u0026logoColor=white\" alt=\"PostgreSQL\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Redis-7-DC382D?style=flat-square\u0026logo=redis\u0026logoColor=white\" alt=\"Redis\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/BullMQ-5.66-E34F26?style=flat-square\u0026logo=redis\u0026logoColor=white\" alt=\"BullMQ\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Docker-Ready-2496ED?style=flat-square\u0026logo=docker\u0026logoColor=white\" alt=\"Docker\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/MCP-Compatible-8B5CF6?style=flat-square\" alt=\"MCP\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Ollama-Supported-FF6B35?style=flat-square\" alt=\"Ollama\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/OpenAI-Supported-412991?style=flat-square\u0026logo=openai\u0026logoColor=white\" alt=\"OpenAI\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Anthropic-Supported-D4A574?style=flat-square\" alt=\"Anthropic\" /\u003e\n\u003c/p\u003e\n\n---\n\n## ✨ Overview\n\nNeuronHub is a powerful, self-hosted platform for managing multiple Large Language Models (LLMs) from a single interface. Whether you're running local models with Ollama or connecting to cloud providers like OpenAI and Anthropic, NeuronHub provides a unified dashboard to manage, compare, and interact with all your AI models.\n\n---\n\n## 🎯 Why NeuronHub?\n\n\u003e A complete LLM operations platform — manage, compare, train, and integrate your AI models.\n\n### 🚀 Core Capabilities\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n### 🎨 **Model Studio**\nVisual editor to shape your AI's personality. Adjust communication style, response length, creativity via sliders. Define behavior rules (what the model must/must not do). Add knowledge and facts. **No prompt engineering required.**\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n### 🧪 **Behavior Testing**\nCreate test suites to verify your model behaves correctly. \"Does it refuse medical diagnoses?\" \"Does it know its identity?\" Run automated tests before deploying. Track pass/fail rates over versions.\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n### ⚖️ **Model Comparison**\nRun the same prompt against multiple models simultaneously. See responses side-by-side. Find the best model for your use case without guesswork.\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n### 📝 **Prompt Templates**\n18+ ready-to-use templates across 6 categories: Development, Language, Creative, Analysis, Business. Create your own with `{{variables}}`. Share across your team.\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n### 🎓 **Model Training**\nFine-tune Ollama models via UI. Upload training data, select a preset, click train. Background worker handles the job. Your tuned model appears in the list — no CLI needed.\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n### 🔌 **MCP Integration**\n17 tools for IDE integration. Use your models from VS Code (Cline), Claude Desktop, or Zed. Manage prompts, run comparisons, trigger training — without leaving your editor.\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n### 💡 Perfect For\n\n| Use Case | How NeuronHub Helps |\n|----------|---------------------|\n| **Prompt Engineers** | 18 templates, custom prompt creation, test across models instantly |\n| **Developers** | MCP integration, REST API, model comparison for choosing the right LLM |\n| **Teams** | Shared prompt library, centralized model management, usage tracking |\n| **AI Trainers** | Fine-tune Ollama models via UI, 8 training presets, progress tracking |\n| **Enterprises** | Self-hosted, no data leaves your network, API key management |\n\n### 🚀 Get Started in 60 Seconds\n\n```bash\ngit clone https://github.com/tron4x/neuronhub.git \u0026\u0026 cd neuronhub\ndocker-compose up -d\n# Open http://localhost:3001 🎉\n```\n\n---\n\n## 📸 Screenshots\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🖼️ Click to view screenshots\u003c/strong\u003e\u003c/summary\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"public/neuronhub2.png\" alt=\"NeuronHub Dashboard\" width=\"80%\" /\u003e\n  \u003cbr/\u003e\n  \u003cem\u003eDashboard - Your central AI command center\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"public/neuronhub1.png\" alt=\"NeuronHub Chat Interface\" width=\"80%\" /\u003e\n  \u003cbr/\u003e\n  \u003cem\u003eLLM Model Status ( Ollama )\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"public/chat.png\" alt=\"NeuronHub Chat with Markdown\" width=\"80%\" /\u003e\n  \u003cbr/\u003e\n  \u003cem\u003eChat - Full markdown rendering and code highlighting\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"public/modelstudio1.png\" alt=\"Model Studio - Personality Editor\" width=\"80%\" /\u003e\n  \u003cbr/\u003e\n  \u003cem\u003eModel Studio - Visual personality editor with sliders\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"public/modelstudio2.png\" alt=\"Model Studio - Behavior Rules\" width=\"80%\" /\u003e\n  \u003cbr/\u003e\n  \u003cem\u003eModel Studio - Define behavior rules for your AI\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"public/modelcomparison.png\" alt=\"Model Comparison\" width=\"80%\" /\u003e\n  \u003cbr/\u003e\n  \u003cem\u003eModel Comparison - Test multiple models side-by-side\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"public/trainingmodel.png\" alt=\"Model Training\" width=\"80%\" /\u003e\n  \u003cbr/\u003e\n  \u003cem\u003eModel Training - Fine-tune models with live progress\u003c/em\u003e\n\u003c/p\u003e\n\n\u003c/details\u003e\n\n---\n\n## 🚀 Features\n\n| Feature | Description |\n|---------|-------------|\n| **🤖 Multi-Model Management** | Manage local (Ollama, Open WebUI) and cloud LLMs (OpenAI, Anthropic) in one place |\n| **🔍 Model Discovery** | Automatic detection of local Ollama models, Docker containers (Ollama, LocalAI, vLLM, TGI), and Open WebUI |\n| **💬 Chat Interface** | Beautiful chat interface with any configured model |\n| **⚖️ Model Comparison** | Compare responses from multiple models side-by-side |\n| **📝 Prompt Templates** | Create, manage, and reuse prompt templates with 18+ predefined templates |\n| **🎯 Training Presets** | 8 predefined training configurations for common use cases |\n| **📊 Usage Tracking** | Monitor token usage, request counts, and costs |\n| **🔑 API Key Management** | Securely store and manage provider API keys |\n| **🌙 Dark/Light Mode** | Beautiful UI with theme support |\n| **🔌 MCP Integration** | Full Model Context Protocol support for AI assistants |\n| **🐳 Docker Ready** | One-command deployment with Docker Compose |\n\n## 🛠️ Tech Stack\n\n| Layer | Technologies |\n|-------|--------------|\n| **Frontend** | Next.js 16.1, React 19.2, Tailwind CSS 3.4, Framer Motion 12 |\n| **Backend** | Next.js API Routes, Prisma 7.2 ORM |\n| **Database** | PostgreSQL |\n| **Cache/Queue** | Redis, BullMQ 5.6 |\n| **Container** | Docker, Docker Compose |\n| **MCP** | Model Context Protocol SDK |\n| **Language** | TypeScript 5.9 |\n\n## 📦 Installation\n\n### Prerequisites\n\n- **Git** - to clone the repository\n- **Node.js 22+** - JavaScript runtime ([nodejs.org](https://nodejs.org/))\n- **Docker \u0026 Docker Compose** - for containerized deployment ([docker.com](https://www.docker.com/))\n- **Ollama** (optional) - for local LLM models ([ollama.ai](https://ollama.ai/))\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🦙 Ollama Setup (for local models)\u003c/strong\u003e\u003c/summary\u003e\n\nIf you want to use local LLM models with Ollama:\n\n**1. Install Ollama**\n\n| Platform | Installation |\n|----------|--------------|\n| **macOS** | `brew install ollama` or download from [ollama.ai](https://ollama.ai/) |\n| **Linux** | `curl -fsSL https://ollama.ai/install.sh \\| sh` |\n| **Windows** | Download installer from [ollama.ai/download](https://ollama.ai/download) |\n\n**2. Start Ollama**\n\nOllama must be running before NeuronHub can discover and use local models:\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🍎 macOS\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\n# Option 1: Start as background service (recommended)\nbrew services start ollama\n\n# Option 2: Run manually in terminal\nollama serve\n\n# Check if running\nbrew services list | grep ollama\n# or\ncurl http://localhost:11434/api/tags\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🐧 Linux\u003c/strong\u003e\u003c/summary\u003e\n\n```bash\n# Option 1: Start as systemd service (recommended)\nsudo systemctl start ollama\nsudo systemctl enable ollama  # Auto-start on boot\n\n# Option 2: Run manually in terminal\nollama serve\n\n# Check if running\nsystemctl status ollama\n# or\ncurl http://localhost:11434/api/tags\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🪟 Windows\u003c/strong\u003e\u003c/summary\u003e\n\n```powershell\n# Option 1: Ollama runs automatically after installation\n# Check the system tray for the Ollama icon\n\n# Option 2: Start manually via command line\nollama serve\n\n# Check if running (PowerShell)\nInvoke-RestMethod http://localhost:11434/api/tags\n```\n\n\u003e **Note:** On Windows, Ollama typically starts automatically as a background process after installation. \n\u003e Look for the Ollama icon in the system tray.\n\n\u003c/details\u003e\n\n**3. Pull models**\n\nDownload at least one model before using NeuronHub:\n\n```bash\n# Example: Pull popular models\nollama pull llama3.2\nollama pull mistral\nollama pull qwen3:14b\n\n# List downloaded models\nollama list\n```\n\n\u003e **Note:** NeuronHub will automatically discover all pulled Ollama models via the `/api/models/discover` endpoint.\n\n\u003c/details\u003e\n\n### 🚀 One-Click Start (Mac/Linux)\n\nThe easiest way to start NeuronHub is using the `start.sh` script:\n\n```bash\n# Clone repository\ngit clone https://github.com/tron4x/neuronhub.git\ncd neuronhub\n\n# Create .env file\ncp .env.example .env\n\n# Make executable (only needed once)\nchmod +x start.sh\n\n# Start NeuronHub\n./start.sh\n```\n\n### Quick Start\n\n```bash\n# Clone repository\ngit clone https://github.com/tron4x/neuronhub.git\ncd neuronhub\n\n# Install dependencies\nnpm install\n\n# Create .env file\ncp .env.example .env\n\n# Start PostgreSQL and Redis\ndocker-compose up -d postgres redis\n\n# Initialize database\nnpx prisma db push\nnpx prisma generate\n\n# Start development server\nnpm run dev\n```\n\n🌐 Open http://localhost:3001 in your browser\n\n**Requirements:** Docker Desktop (Mac) or Docker Engine (Linux) must be installed and running.\n\nThe script will:\n- ✅ Check if Docker is running\n- ✅ Build and start all containers (App, Worker, PostgreSQL, Redis)\n- ✅ Display service status and connection info\n- ✅ Show useful commands\n\n🌐 Open http://localhost:3001 when ready!\n\n### Docker Deployment (Manual)\n\n```bash\n# Start all services (App, Worker, PostgreSQL, Redis)\ndocker-compose up -d\n\n# View logs\ndocker-compose logs -f app\n\n# Stop all services\ndocker-compose down\n```\n\n## ⚙️ Configuration\n\nCreate a `.env` file in the root directory:\n\n```env\n# Database\nDATABASE_URL=\"postgresql://neuronhub:neuronhub_secret@localhost:5433/neuronhub\"\n\n# Redis\nREDIS_URL=\"redis://localhost:6380\"\n\n# API Keys (optional - add as needed)\nOPENAI_API_KEY=\"sk-...\"\nANTHROPIC_API_KEY=\"sk-ant-...\"\nGOOGLE_API_KEY=\"...\"\n\n# Auth\nAUTH_SECRET=\"your-super-secret-key-here\"\nNEXTAUTH_URL=\"http://localhost:3001\"\n```\n\n## 📱 Application Routes\n\n| Route | Description |\n|-------|-------------|\n| `/` | Dashboard with statistics and quick actions |\n| `/chat` | Chat interface with model selection |\n| `/compare` | Side-by-side model comparison |\n| `/models` | Model management and configuration |\n| `/prompts` | Prompt template library |\n| `/training` | Fine-tuning job management |\n| `/api-keys` | API key management |\n| `/settings` | System settings |\n\n## 🐳 Docker Services\n\n| Service | Port | Description |\n|---------|------|-------------|\n| `app` | 3001 | Next.js Application |\n| `postgres` | 5433 | PostgreSQL Database |\n| `redis` | 6380 | Redis Cache \u0026 Queue |\n| `worker` | - | Background Job Worker (BullMQ) |\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e⚡ Background Worker (BullMQ)\u003c/strong\u003e\u003c/summary\u003e\n\nNeuronHub includes a powerful background worker powered by **BullMQ** for processing asynchronous tasks. The worker runs as a separate Docker container and handles long-running operations without blocking the main application.\n\n### Worker Queues\n\n| Queue | Description |\n|-------|-------------|\n| `training-jobs` | Processes AI model fine-tuning jobs with progress tracking |\n| `inference-jobs` | Handles batch/async LLM inference requests |\n| `model-discovery` | Discovers available models from Ollama, Open WebUI, Docker containers (LocalAI, vLLM, TGI) |\n\n### Features\n\n- **🔄 Automatic Retry** - Failed jobs are automatically retried with exponential backoff\n- **📊 Progress Tracking** - Real-time progress updates for training jobs (0-100%)\n- **📝 Job Logging** - All job activities are logged to the database\n- **⚡ Concurrency** - Multiple jobs can run in parallel\n- **🛡️ Graceful Shutdown** - Jobs are properly cleaned up on shutdown\n- **💾 Persistence** - Jobs survive restarts (Redis-backed)\n\n### Worker Commands\n\n```bash\n# Start worker in development\nnpm run worker:dev\n\n# Start worker in production\nnpm run worker\n\n# View worker logs (Docker)\ndocker-compose logs -f worker\n```\n\n### Architecture\n\n```\n┌─────────────┐     ┌─────────────┐     ┌─────────────┐\n│   Next.js   │────▶│    Redis    │◀────│   Worker    │\n│     API     │     │   (BullMQ)  │     │  (worker.ts)│\n└─────────────┘     └─────────────┘     └─────────────┘\n                           │\n                           ▼\n                    ┌─────────────┐\n                    │  PostgreSQL │\n                    │  (Results)  │\n                    └─────────────┘\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🤖 MCP Server Integration\u003c/strong\u003e\u003c/summary\u003e\n\nNeuronHub includes a full **Model Context Protocol (MCP)** server that allows any MCP-compatible AI assistant to interact with your LLM platform.\n\n**Supported Clients:** Claude Desktop, Cline (VS Code), Zed, any MCP-compatible client\n\n### Setup for Cline (VS Code)\n\nAdd to `cline_mcp_settings.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"neuronhub\": {\n      \"command\": \"node\",\n      \"args\": [\"\u003cPATH_TO_NEURONHUB_MCP\u003e/build/index.js\"],\n      \"env\": {\n        \"NEURONHUB_URL\": \"http://localhost:3001\"\n      }\n    }\n  }\n}\n```\n\n\u003e **Note:** Replace `\u003cPATH_TO_NEURONHUB_MCP\u003e` with the actual path where you installed the neuronhub-mcp package.\n\n### Setup for Claude Desktop\n\nAdd to `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"neuronhub\": {\n      \"command\": \"node\",\n      \"args\": [\"\u003cPATH_TO_NEURONHUB_MCP\u003e/build/index.js\"],\n      \"env\": {\n        \"NEURONHUB_URL\": \"http://localhost:3001\"\n      }\n    }\n  }\n}\n```\n\n### MCP Inspector (Debugging \u0026 Testing)\n\nThe **MCP Inspector** is a powerful tool for debugging and testing MCP servers. Use it to verify your NeuronHub MCP connection works correctly.\n\n#### Installation\n\n```bash\nnpm install -g @modelcontextprotocol/inspector\n```\n\n#### Running the Inspector\n\n```bash\n# Start MCP Inspector with NeuronHub\nnpx @modelcontextprotocol/inspector node \u003cPATH_TO_NEURONHUB_MCP\u003e/build/index.js\n```\n\n#### Inspector Parameters\n\n| Parameter | Description | Example |\n|-----------|-------------|---------|\n| **Command** | The runtime to execute | `node` |\n| **Arguments** | Path to the MCP server entry point | `\u003cPATH_TO_NEURONHUB_MCP\u003e/build/index.js` |\n| **Environment Variables** | Configure the MCP server | See below |\n\n\u003e **Note:** Replace `\u003cPATH_TO_NEURONHUB_MCP\u003e` with the actual path where you cloned/installed the neuronhub-mcp package (e.g., `~/Documents/neuronhub-mcp` or `/opt/neuronhub-mcp`).\n\n#### Environment Variables for Inspector\n\nWhen using the MCP Inspector, you can set these environment variables:\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `NEURONHUB_URL` | NeuronHub API base URL | `http://localhost:3001` |\n| `DEBUG` | Enable debug logging | `false` |\n\n#### Example: Full Inspector Command\n\n```bash\n# With environment variable (replace path with your actual path)\nNEURONHUB_URL=http://localhost:3001 npx @modelcontextprotocol/inspector node ~/neuronhub-mcp/build/index.js\n\n# Or start Inspector UI first, then configure in the web interface\nnpx @modelcontextprotocol/inspector\n```\n\nThe Inspector opens a web UI at `http://localhost:5173` where you can:\n- ✅ **List all available tools** - See all 17 MCP tools\n- ✅ **Test tool calls** - Execute tools with custom parameters\n- ✅ **View responses** - Inspect JSON responses\n- ✅ **Debug errors** - See detailed error messages\n- ✅ **Monitor logs** - Real-time server logs\n\n#### Screenshot: Inspector Interface\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│  MCP Inspector                                    [⚙️ Settings] │\n├─────────────────────────────────────────────────────────────┤\n│  Server: neuronhub-mcp                    Status: Connected │\n├─────────────────────────────────────────────────────────────┤\n│  Tools (17)                                                 │\n│  ├── list_models                                            │\n│  ├── get_model                                              │\n│  ├── activate_model                                         │\n│  ├── chat                                                   │\n│  ├── inference                                              │\n│  └── ...                                                    │\n├─────────────────────────────────────────────────────────────┤\n│  [Execute Tool]  [Clear Logs]  [Refresh]                    │\n└─────────────────────────────────────────────────────────────┘\n```\n\n### Available MCP Tools (17 tools)\n\n| Category | Tool | Description |\n|----------|------|-------------|\n| **Models** | `list_models` | List all registered LLM models |\n| | `get_model` | Get detailed model information |\n| | `activate_model` | Activate a model for inference |\n| | `deactivate_model` | Deactivate a model |\n| | `discover_models` | Discover local \u0026 Docker models (Ollama, Open WebUI, LocalAI, vLLM, TGI) |\n| **Chat** | `chat` | Send a chat message to a model |\n| | `inference` | Run inference with full parameters |\n| | `compare_models` | Compare multiple model responses |\n| **Prompts** | `list_prompts` | List all prompt templates |\n| | `get_prompt` | Get a specific template |\n| | `create_prompt` | Create a new template |\n| **Training** | `list_training_jobs` | List fine-tuning jobs |\n| | `get_training_job` | Get job details |\n| | `create_training_job` | Start a new job |\n| | `cancel_training_job` | Cancel a running job |\n| **System** | `get_stats` | Get platform statistics |\n| | `health_check` | Check API health |\n\n\u003c/details\u003e\n\n## 🔌 REST API\n\nAll endpoints are accessible at `http://localhost:3001/api/`\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e📋 Models API\u003c/strong\u003e\u003c/summary\u003e\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET` | `/api/models` | List all models |\n| `POST` | `/api/models` | Create a new model |\n| `GET` | `/api/models/:id` | Get model by ID |\n| `PATCH` | `/api/models/:id` | Update model |\n| `DELETE` | `/api/models/:id` | Delete model |\n| `POST` | `/api/models/discover` | Discover local models |\n| `GET` | `/api/models/health` | Check health of all models |\n| `POST` | `/api/models/health` | Update model status based on health |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e💬 Chat \u0026 Inference API\u003c/strong\u003e\u003c/summary\u003e\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `POST` | `/api/chat` | Chat with a model |\n| `POST` | `/api/inference` | Run inference |\n| `POST` | `/api/compare` | Compare multiple models |\n| `POST` | `/api/embedding` | Generate text embeddings |\n| `GET` | `/api/embedding` | List available embedding models |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🖥️ Hardware API\u003c/strong\u003e\u003c/summary\u003e\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET` | `/api/hardware` | Detect GPU/training hardware capabilities |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e📝 Prompts API\u003c/strong\u003e\u003c/summary\u003e\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET` | `/api/prompts` | List all prompts |\n| `POST` | `/api/prompts` | Create a prompt |\n| `GET` | `/api/prompts/:id` | Get prompt by ID |\n| `PATCH` | `/api/prompts/:id` | Update prompt |\n| `DELETE` | `/api/prompts/:id` | Delete prompt |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🎓 Training API\u003c/strong\u003e\u003c/summary\u003e\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET` | `/api/training` | List training jobs |\n| `POST` | `/api/training` | Create training job |\n| `GET` | `/api/training/:id` | Get job by ID |\n| `PATCH` | `/api/training/:id` | Update/cancel job |\n| `DELETE` | `/api/training/:id` | Delete job |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e📝 Predefined Templates\u003c/strong\u003e\u003c/summary\u003e\n\nNeuronHub includes **18 predefined prompt templates** and **8 training presets** to help you get started quickly.\n\n### Prompt Templates (18 templates in 6 categories)\n\n| Category | Templates |\n|----------|-----------|\n| **📋 Professional** | Document Specialist (System/User/Assistant) |\n| **💻 Development** | Code Reviewer, Code Explainer, Bug Hunter, Test Generator, API Designer |\n| **🌐 Language** | Professional Translator, Grammar \u0026 Style Checker, Text Summarizer |\n| **✍️ Creative** | Story Writer, Blog Post Writer, Professional Email Writer |\n| **📊 Analysis** | Data Analyst, Research Assistant |\n| **💼 Business** | Customer Support Agent, FAQ Generator |\n\n### Training Presets (8 presets)\n\n| Preset | Description | Config |\n|--------|-------------|--------|\n| **Quick Test** | Fast training for testing | 1 epoch, LoRA |\n| **Document Specialist** | Optimized for document analysis | 5 epochs, Fine-tune |\n| **Code Assistant** | Train for code understanding | 3 epochs, LoRA |\n| **Chat Assistant** | Conversational fine-tuning | 4 epochs, Fine-tune |\n| **Instruction Following** | Better instruction adherence | 5 epochs, Fine-tune |\n| **Memory Efficient** | For limited GPU memory | 3 epochs, QLoRA |\n| **High Quality** | Longer training for best results | 10 epochs, Fine-tune |\n| **Embedding Model** | Train sentence embeddings | 5 epochs, Embedding |\n\nAccess templates via:\n- **New Prompt** → Select from dropdown\n- **New Training Job** → Select preset\n\n\u003c/details\u003e\n\n## 🎓 Model Training / Fine-Tuning\n\nNeuronHub supports fine-tuning of language models. You can create training jobs via the UI or API.\n\n### ⚠️ Important: Understanding Training Types\n\nNeuronHub offers **three different training methods**. It's critical to understand what each one actually does:\n\n| Type | What it REALLY does | Model Format | GPU Required | New Model Created? |\n|------|---------------------|--------------|--------------|-------------------|\n| **FINE_TUNE** | Ollama Modelfile customization | GGUF (Ollama) | ❌ No | ❌ No, creates a variant |\n| **LoRA** | Real neural network training | HuggingFace | ✅ Yes | ✅ Yes, new weights |\n| **QLoRA** | 4-bit quantized LoRA training | HuggingFace | ✅ NVIDIA only | ✅ Yes, new weights |\n\n---\n\n#### 🔧 FINE_TUNE (Ollama Modelfile Customization)\n\n**What it does:** Creates an Ollama Modelfile that wraps your base model with:\n- A custom **system prompt** (extracted from your training data)\n- **Parameter tweaks** (temperature, top_p, etc.)\n- **Few-shot examples** (from your training data)\n\n**What it does NOT do:** \n- ❌ Does NOT modify the neural network weights\n- ❌ Does NOT create a truly new model\n- ❌ Does NOT learn new knowledge\n\n**How it works:**\n```dockerfile\n# Generated Modelfile\nFROM qwen3:14b              # Original model stays unchanged\n\nSYSTEM \"\"\"You are a document specialist...\"\"\"   # Custom behavior\n\nPARAMETER temperature 0.7   # Parameter tweaks\nPARAMETER top_p 0.9\n\nMESSAGE user \"Example question\"       # Few-shot examples\nMESSAGE assistant \"Example answer\"\n```\n\n**Result:** A model variant like `qwen3-14b-tuned-1737572XXX` that:\n- Uses the **same weights** as the base model\n- Has a **different personality** via system prompt\n- Appears as a separate model in Ollama (`ollama list`)\n\n**Best for:** Quick customization, no GPU needed, works with any Ollama model.\n\n---\n\n#### 🧠 LoRA / QLoRA (Real Neural Network Training)\n\n**What it does:** Actually modifies the model's neural network weights using:\n- **PEFT** (Parameter-Efficient Fine-Tuning) library\n- **Low-Rank Adaptation** - trains small \"adapter\" matrices\n- **HuggingFace Transformers** for model loading\n\n**What it does:**\n- ✅ Learns NEW patterns from your training data\n- ✅ Creates NEW model weights (adapter + merged)\n- ✅ Can learn things the base model didn't know\n\n**How it works:**\n```\n1. Load HuggingFace model (e.g., mistralai/Ministral-8B)\n2. Freeze base weights\n3. Add small trainable LoRA adapters (~1-5% of params)\n4. Train on your JSONL data for N epochs\n5. Save adapter → Merge with base → Convert to GGUF\n6. Register in Ollama\n```\n\n**Requirements:**\n- **LoRA:** Any GPU (CUDA, Apple MPS, or even CPU - but slow)\n- **QLoRA:** NVIDIA GPU with CUDA (uses 4-bit quantization)\n- **HuggingFace model** (NOT Ollama models)\n\n**Best for:** When you need the model to truly learn new knowledge or behaviors.\n\n---\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🖥️ LoRA/QLoRA Training by Platform (Docker)\u003c/strong\u003e\u003c/summary\u003e\n\nAll training runs in Docker containers. Choose your platform:\n\n### 🐧 Linux (Recommended)\n\nLinux with NVIDIA GPU provides the best training experience.\n\n**Requirements:**\n- Docker \u0026 Docker Compose\n- NVIDIA Driver 525+\n- NVIDIA Container Toolkit\n\n**Setup NVIDIA Docker:**\n```bash\n# Install NVIDIA Container Toolkit\ndistribution=$(. /etc/os-release;echo $ID$VERSION_ID)\ncurl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -\ncurl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \\\n  sudo tee /etc/apt/sources.list.d/nvidia-docker.list\n\nsudo apt-get update \u0026\u0026 sudo apt-get install -y nvidia-container-toolkit\nsudo systemctl restart docker\n\n# Start NeuronHub\ndocker-compose up -d\n\n# Verify GPU in container\ndocker-compose exec worker nvidia-smi\n```\n\n**Supported:**\n- FINE_TUNE ✅ | LoRA ✅ | QLoRA ✅ | Unsloth ✅\n\n---\n\n### 🪟 Windows\n\nWindows uses Docker Desktop with WSL2 backend.\n\n**Requirements:**\n- Windows 10/11 Pro or Enterprise\n- Docker Desktop 4.x with WSL2 backend\n- NVIDIA GPU + Driver 525+ (optional)\n\n**Setup:**\n```powershell\n# 1. Install Docker Desktop from docker.com\n# 2. Enable WSL2 backend in Docker Desktop settings\n# 3. For GPU: Enable \"Use WSL 2 based engine\" + install NVIDIA drivers\n\n# Start NeuronHub\ndocker-compose up -d\n\n# Verify (PowerShell)\ndocker-compose exec worker python3 -c \"import torch; print('CUDA:', torch.cuda.is_available())\"\n```\n\n**Supported:**\n- FINE_TUNE ✅ | LoRA ✅ (GPU/CPU) | QLoRA ✅ (NVIDIA only)\n\n---\n\n### 🍎 macOS\n\nDocker on macOS runs in a Linux VM without direct GPU access.\n\n**Requirements:**\n- Docker Desktop for Mac\n\n**Setup:**\n```bash\n# Start NeuronHub\ndocker-compose up -d\n\n# Training runs on CPU in Docker (no MPS access)\ndocker-compose exec worker python3 -c \"import torch; print('MPS:', torch.backends.mps.is_available())\"\n# Output: MPS: False (expected in Docker)\n```\n\n**Supported:**\n- FINE_TUNE ✅ | LoRA ⚠️ (CPU - slow) | QLoRA ❌\n\n\u003e **Note:** Docker on Mac cannot access Apple Silicon GPU. FINE_TUNE (Ollama Modelfile) works fast on any system. For faster LoRA training on Mac, consider cloud GPUs.\n\n---\n\n### ☁️ Cloud GPUs\n\nCloud GPUs provide the best training performance.\n\n| Provider | Instance | GPU | VRAM | Example Use Case |\n|----------|----------|-----|------|------------------|\n| AWS | p3.2xlarge | V100 | 16GB | e.g. LoRA 7B models |\n| AWS | p4d.24xlarge | A100 | 40GB | e.g. larger models |\n| GCP | a2-highgpu-1g | A100 | 40GB | e.g. fine-tuning |\n| Azure | NC24ads_A100_v4 | A100 | 80GB | e.g. 70B+ models |\n| RunPod | RTX 4090 | 4090 | 24GB | e.g. budget option |\n| Lambda | A100 | A100 | 40/80GB | e.g. general training |\n\n\u003e **Note:** These are example configurations. Actual requirements depend on model size and training type.\n\n**Quick Setup:**\n```bash\n# On cloud VM (Ubuntu)\ncurl -fsSL https://get.docker.com | sh\n# Install NVIDIA Container Toolkit (see Linux section)\n\ngit clone https://github.com/tron4x/neuronhub.git \u0026\u0026 cd neuronhub\ndocker-compose up -d\n```\n\n---\n\n### Platform Summary\n\n| Platform | FINE_TUNE | LoRA | QLoRA | Unsloth |\n|----------|-----------|------|-------|---------|\n| Linux + NVIDIA | ✅ | ✅ | ✅ | ✅ |\n| Windows + NVIDIA | ✅ | ✅ | ✅ | ✅ |\n| macOS (Docker) | ✅ | ⚠️ CPU | ❌ | ❌ |\n| Cloud GPU | ✅ | ✅ | ✅ | ✅ |\n\n\u003c/details\u003e\n\n---\n\n#### 📊 Comparison Example\n\n| Scenario | Use FINE_TUNE | Use LoRA/QLoRA |\n|----------|---------------|----------------|\n| \"Make model respond in German\" | ✅ System prompt | ❌ Overkill |\n| \"Give model a personality\" | ✅ System prompt | ❌ Overkill |\n| \"Teach model domain knowledge\" | ❌ Can't learn | ✅ Yes |\n| \"Train on 10,000 examples\" | ❌ Only few-shot | ✅ Full training |\n| \"No GPU available\" | ✅ Works | ❌ Needs GPU |\n| \"Quick test in 1 minute\" | ✅ Fast | ❌ Takes hours |\n\n---\n\n### Training via Web UI\n\n1. Navigate to **Training** in the main menu (or `/training`)\n2. Click **\"New Job\"**\n3. Configure your training:\n   - **Select Model**: Choose the base model to fine-tune\n   - **Training Type**: \n     - `FINE_TUNE` - Full fine-tuning\n     - `LORA` - Low-Rank Adaptation (efficient)\n     - `QLORA` - Quantized LoRA (memory efficient)\n   - **Dataset Path**: Path or URL to your training data (JSONL, CSV, Parquet)\n   - **Hyperparameters**: Epochs, Batch Size, Learning Rate\n4. Click **\"Start Training\"**\n\n### Ollama Modelfile Customization\n\nNeuronHub supports **real Ollama training** through Modelfile customization. When you create a training job for an Ollama model, the worker:\n\n1. **Extracts Training Data**: Parses your JSONL file for system prompts and examples\n2. **Creates Modelfile**: Generates an Ollama Modelfile with:\n   ```dockerfile\n   FROM deepseek-r1:8b           # Your base model\n   \n   SYSTEM \"\"\"Your custom system prompt extracted from training data\"\"\"\n   \n   PARAMETER temperature 0.7     # Based on learning rate\n   PARAMETER top_p 0.9\n   PARAMETER repeat_penalty 1.1\n   PARAMETER num_ctx 4096\n   \n   # Few-shot examples from training data\n   MESSAGE user Example question...\n   MESSAGE assistant Example answer...\n   ```\n3. **Creates New Model**: Runs `ollama create \u003cmodel-name\u003e-tuned` \n4. **Validates Model**: Tests the new model with a sample prompt\n5. **Registers in NeuronHub**: Adds the tuned model to your model library\n\n**Result**: A new model variant like `deepseek-r1-8b-tuned-1737572XXX` that appears in your Models page!\n\n### Creator Attribution (Permanent)\n\nWhen you create a tuned model, your attribution is **permanently embedded** in the model:\n\n```\n\"You are a helpful AI assistant. This model was fine-tuned by tron4x using NeuronHub. \nBase model: qwen3:14b.\"\n```\n\n**What this means:**\n- ✅ The system prompt is permanently stored in the model\n- ✅ Every time someone uses the model, the attribution is active\n- ✅ You can verify with: `ollama show your-tuned-model`\n- ✅ Asking \"Who created you?\" will mention tron4x\n\n**Storage location:**\n- Model files: `~/.ollama/models/`\n- Configuration embedded in model manifest\n\n**Note:** This is Modelfile customization (system prompt + parameters). For actual neural network weight fine-tuning (LoRA/QLoRA), you'd need GPU + training frameworks like unsloth. The Modelfile approach is the quickest way to personalize a model's behavior and identity.\n\n### Running the Training Worker\n\nThe worker must be running to process training jobs:\n\n```bash\n# Make sure Redis is running\ndocker-compose up -d redis\n\n# Start the worker (development)\nnpm run worker:dev\n\n# Or with Docker\ndocker-compose up -d worker\n\n# View worker logs\ndocker-compose logs -f worker\n```\n\n### Training Process Flow\n\n```\n┌──────────────┐     ┌──────────────┐     ┌──────────────┐\n│   QUEUED     │────▶│  PREPARING   │────▶│   TRAINING   │\n│   (10%)      │     │    (20%)     │     │    (40%)     │\n└──────────────┘     └──────────────┘     └──────────────┘\n                                                 │\n                                                 ▼\n┌──────────────┐     ┌──────────────┐     ┌──────────────┐\n│  COMPLETED   │◀────│  VALIDATING  │◀────│ ollama create│\n│   (100%)     │     │    (90%)     │     │    (80%)     │\n└──────────────┘     └──────────────┘     └──────────────┘\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🔧 Training via API, MCP \u0026 Examples\u003c/strong\u003e\u003c/summary\u003e\n\n### Training via API\n\n```bash\n# Create a fine-tuning job\ncurl -X POST http://localhost:3001/api/training \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"modelId\": \"YOUR_MODEL_ID\",\n    \"name\": \"My Fine-Tune Job\",\n    \"trainingType\": \"LORA\",\n    \"epochs\": 3,\n    \"batchSize\": 4,\n    \"learningRate\": 0.0001\n  }' | jq\n```\n\n### Training Data Format\n\nPrepare your training data in JSONL format:\n\n```jsonl\n{\"messages\": [{\"role\": \"system\", \"content\": \"You are a helpful assistant.\"}, {\"role\": \"user\", \"content\": \"Hello\"}, {\"role\": \"assistant\", \"content\": \"Hi! How can I help you?\"}]}\n{\"messages\": [{\"role\": \"user\", \"content\": \"What is AI?\"}, {\"role\": \"assistant\", \"content\": \"AI stands for Artificial Intelligence...\"}]}\n```\n\nOr in conversational format:\n\n```jsonl\n{\"prompt\": \"What is machine learning?\", \"completion\": \"Machine learning is a subset of AI...\"}\n{\"prompt\": \"Explain neural networks\", \"completion\": \"Neural networks are computing systems...\"}\n```\n\n### Training via MCP\n\n```\n# List all training jobs\nUse the list_training_jobs tool\n\n# Create a new training job\nUse the create_training_job tool with:\n- modelId: The ID of the base model\n- trainingType: FINE_TUNE, LORA, or QLORA\n- epochs: Number of training epochs (default: 3)\n- batchSize: Batch size (default: 4)\n- learningRate: Learning rate (default: 0.0001)\n\n# Check job status\nUse the get_training_job tool with jobId\n\n# Cancel a running job\nUse the cancel_training_job tool with jobId\n```\n\n### Example: Complete Training Workflow\n\n```bash\n# 1. First, get the model ID you want to fine-tune\ncurl -s http://localhost:3001/api/models | jq '.[] | {id, name}'\n\n# 2. Create training job\ncurl -X POST http://localhost:3001/api/training \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"modelId\": \"cm123abc\",\n    \"name\": \"Customer Support Fine-Tune\",\n    \"description\": \"Fine-tune for customer support responses\",\n    \"trainingType\": \"LORA\",\n    \"epochs\": 5,\n    \"batchSize\": 8,\n    \"learningRate\": 0.00005\n  }' | jq\n\n# 3. Check training progress\ncurl -s http://localhost:3001/api/training | jq '.[] | {id, status, progress, model: .model.displayName}'\n\n# 4. Get detailed job info\ncurl -s http://localhost:3001/api/training/JOB_ID | jq\n\n# 5. Cancel job if needed\ncurl -X PATCH http://localhost:3001/api/training/JOB_ID \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"status\": \"CANCELLED\"}'\n```\n\n\u003c/details\u003e\n\n### Training Job Status\n\n| Status | Description |\n|--------|-------------|\n| `QUEUED` | Job is waiting to start |\n| `PREPARING` | Preparing training environment |\n| `TRAINING` | Training in progress |\n| `VALIDATING` | Validating trained model |\n| `COMPLETED` | Training finished successfully |\n| `FAILED` | Training failed (check error message) |\n| `CANCELLED` | Job was cancelled by user |\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🔑 API Keys \u0026 Settings\u003c/strong\u003e\u003c/summary\u003e\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `GET` | `/api/api-keys` | List API keys |\n| `POST` | `/api/api-keys` | Create API key |\n| `DELETE` | `/api/api-keys/:id` | Delete key |\n| `GET` | `/api/health` | Health check |\n| `GET` | `/api/stats` | Usage statistics |\n| `GET/PATCH` | `/api/settings` | Get/Update settings |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🔧 curl Examples\u003c/strong\u003e\u003c/summary\u003e\n\n### Models\n\n```bash\n# List all models\ncurl -s http://localhost:3001/api/models | jq\n\n# List active models only\ncurl -s \"http://localhost:3001/api/models?status=ACTIVE\" | jq\n\n# Get model names and parameters\ncurl -s http://localhost:3001/api/models | jq '.[] | {name, displayName, contextLength, maxTokens, temperature}'\n\n# Get specific model by ID\ncurl -s http://localhost:3001/api/models/MODEL_ID | jq\n\n# Activate a model\ncurl -X PATCH http://localhost:3001/api/models/MODEL_ID \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"status\": \"ACTIVE\"}'\n\n# Delete a model\ncurl -X DELETE http://localhost:3001/api/models/MODEL_ID\n```\n\n### Model Discovery\n\n```bash\n# Discover local models (Ollama, Docker containers)\ncurl -X POST http://localhost:3001/api/models/discover | jq\n\n# List discovered models with context length\ncurl -s http://localhost:3001/api/models/discover | jq '.[] | {name, source, contextLength, metadata}'\n```\n\n### Chat \u0026 Inference\n\n```bash\n# Simple chat\ncurl -X POST http://localhost:3001/api/chat \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"qwen3:14b\",\n    \"message\": \"Hello, how are you?\"\n  }' | jq\n\n# Chat with system prompt\ncurl -X POST http://localhost:3001/api/chat \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"mistral:7b\",\n    \"message\": \"Explain quantum computing\",\n    \"systemPrompt\": \"You are a physics professor. Explain simply.\",\n    \"temperature\": 0.7\n  }' | jq\n\n# Full inference with parameters\ncurl -X POST http://localhost:3001/api/inference \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"qwen3:14b\",\n    \"messages\": [\n      {\"role\": \"system\", \"content\": \"You are a helpful assistant\"},\n      {\"role\": \"user\", \"content\": \"Write a haiku\"}\n    ],\n    \"temperature\": 0.8,\n    \"maxTokens\": 100\n  }' | jq\n```\n\n### Compare Models\n\n```bash\n# Compare responses from multiple models\ncurl -X POST http://localhost:3001/api/compare \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"models\": [\"qwen3:14b\", \"mistral:7b\"],\n    \"prompt\": \"What is the meaning of life?\"\n  }' | jq\n```\n\n### Statistics \u0026 Health\n\n```bash\n# Get platform statistics\ncurl -s http://localhost:3001/api/stats | jq\n\n# Health check\ncurl -s http://localhost:3001/api/health | jq\n```\n\n### Prompts\n\n```bash\n# List all prompts\ncurl -s http://localhost:3001/api/prompts | jq\n\n# Create a new prompt template\ncurl -X POST http://localhost:3001/api/prompts \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"Code Review\",\n    \"description\": \"Review code for best practices\",\n    \"category\": \"development\",\n    \"systemPrompt\": \"You are an expert code reviewer\",\n    \"userPromptTemplate\": \"Review this {{language}} code:\\n\\n{{code}}\"\n  }' | jq\n```\n\n\u003c/details\u003e\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## 📄 License\n\nThis project is licensed under the **GNU Affero General Public License v3.0 (AGPL-3.0)** - see the [LICENSE](LICENSE) file for details.\n\n**What this means:**\n- ✅ You can use, modify, and distribute the code\n- ✅ You must provide source code for any changes\n- ✅ If you run a modified version as a web service, you must release the source code\n- ❌ You cannot make this code proprietary\n\n## 🚀 What's New in v1.3.2\n\n### ⚡ Chat Streaming\n\nReal-time streaming responses - watch AI responses appear word-by-word!\n\n- **Streaming Toggle** - Enable/disable in Chat Settings (⚙️ icon)\n- **Stop Button** - Cancel generation mid-response (red button appears while generating)\n- **Auto-Scroll** - Chat automatically follows new text\n- Works with Ollama and OpenAI models\n\n### 📦 Prompt Import/Export\n\nShare and backup your prompt templates:\n\n- **Export** - Download all prompts as JSON (⬇️ button)\n- **Import** - Upload JSON file to import prompts (⬆️ button)\n- **Import Modes**:\n  - Skip existing - Keep your prompts, only add new ones\n  - Overwrite - Replace existing prompts with imported versions\n- Smart UI - Export button disabled when no prompts exist\n\n### 🎨 UI Improvements\n\n- Cleaner chat interface - AI responses now blend with page background\n- Improved markdown rendering during streaming\n\n## 🚀 Coming Next\n\n| Feature | Description | Status |\n|---------|-------------|--------|\n| **🧬 Embeddings** | Generate and manage text embeddings for semantic search | ✅ Implemented |\n| **🔄 Model Versioning** | Track different versions of fine-tuned models | 📋 Planned |\n| **📊 Advanced Analytics** | Model performance metrics and dashboards | 📋 Planned |\n| **🌐 Distributed Training** | Multi-GPU training across nodes | 📋 Planned |\n\n\u003e 💡 **Want to suggest a feature?** [Open an issue](https://github.com/tron4x/neuronhub/issues) on GitHub!\n\n## 🙏 Technologies Used\n\n**LLM Providers:**\n- [Ollama](https://ollama.ai/) - Local LLM runtime (MIT License)\n- [OpenAI](https://openai.com/) - GPT models API\n- [Anthropic](https://anthropic.com/) - Claude models API\n\n**Frontend:**\n- [Next.js](https://nextjs.org/) - React framework by Vercel\n- [React](https://react.dev/) - UI library\n- [Tailwind CSS](https://tailwindcss.com/) - Utility-first CSS\n- [Framer Motion](https://www.framer.com/motion/) - Animations\n\n**Backend:**\n- [Prisma](https://prisma.io/) - Database ORM\n- [PostgreSQL](https://www.postgresql.org/) - Database\n- [Redis](https://redis.io/) - Cache \u0026 Queue\n- [BullMQ](https://bullmq.io/) - Job queue\n\n**ML/Training:**\n- [HuggingFace Transformers](https://huggingface.co/transformers/) - Model loading\n- [PEFT](https://huggingface.co/docs/peft/) - LoRA training\n- [PyTorch](https://pytorch.org/) - ML framework\n\n**Standards:**\n- [Model Context Protocol](https://modelcontextprotocol.io/) - MCP standard\n\n---\n\n\u003cp align=\"center\"\u003e\n  Made with ❤️ by \u003ca href=\"https://github.com/tron4x\"\u003etron4x\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003e\n    NeuronHub is developed and maintained by tron4x. While we strive for quality,\u003cbr/\u003e\n    bugs may occur. We actively monitor and address reported issues.\u003cbr/\u003e\n    Your feedback helps make NeuronHub better! 🚀\u003cbr/\u003e\n    \u003cbr/\u003e\n    Thank you for your support and feedback! 🙏\n  \u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/tron4x/neuronhub/issues\"\u003eReport Bug\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/tron4x/neuronhub/issues\"\u003eRequest Feature\u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftron4x%2Fneuronhub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftron4x%2Fneuronhub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftron4x%2Fneuronhub/lists"}