Files
5why-analyzer/package.json
donald 957003bc7c feat: Add multi-LLM provider support with DeepSeek integration
Major Features:
-  Multi-LLM provider support (DeepSeek, Ollama, OpenAI, Custom)
- 🤖 Admin panel LLM configuration management UI
- 🔄 Dynamic provider switching without restart
- 🧪 Built-in API connection testing
- 🔒 Secure API key management

Backend Changes:
- Add routes/llmConfig.js: Complete LLM config CRUD API
- Update routes/analyze.js: Use database LLM configuration
- Update server.js: Add LLM config routes
- Add scripts/add-deepseek-config.js: DeepSeek setup script

Frontend Changes:
- Update src/pages/AdminPage.jsx: Add LLM Config tab + modal
- Update src/services/api.js: Add LLM config API methods
- Provider presets for DeepSeek, Ollama, OpenAI
- Test connection feature in config modal

Configuration:
- Update .env.example: Add DeepSeek API configuration
- Update package.json: Add llm:add-deepseek script

Documentation:
- Add docs/LLM_CONFIGURATION_GUIDE.md: Complete guide
- Add DEEPSEEK_INTEGRATION.md: Integration summary
- Quick setup instructions for DeepSeek

API Endpoints:
- GET /api/llm-config: List all configurations
- GET /api/llm-config/active: Get active configuration
- POST /api/llm-config: Create configuration
- PUT /api/llm-config/🆔 Update configuration
- PUT /api/llm-config/:id/activate: Activate configuration
- DELETE /api/llm-config/🆔 Delete configuration
- POST /api/llm-config/test: Test API connection

Database:
- Uses existing llm_configs table
- Only one config active at a time
- Fallback to Ollama if no database config

Security:
- Admin-only access to LLM configuration
- API keys never returned in GET requests
- Audit logging for all config changes
- Cannot delete active configuration

DeepSeek Model:
- Model: deepseek-chat
- High-quality 5 Why analysis
- Excellent Chinese language support
- Cost-effective pricing

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 00:33:10 +08:00

50 lines
1.3 KiB
JSON

{
"name": "5why-analyzer",
"version": "1.0.0",
"description": "5 Why Root Cause Analysis Tool with Ollama API Integration",
"type": "module",
"scripts": {
"start": "python app.py",
"dev": "concurrently \"npm run server\" \"npm run client\"",
"server": "node server.js",
"client": "vite",
"build": "vite build",
"preview": "vite preview",
"db:init": "node scripts/init-database.js",
"db:test": "node scripts/test-db-connection.js",
"llm:add-deepseek": "node scripts/add-deepseek-config.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"5why",
"root-cause-analysis",
"ollama",
"qwen"
],
"author": "",
"license": "MIT",
"dependencies": {
"express": "^4.18.2",
"cors": "^2.8.5",
"axios": "^1.6.2",
"dotenv": "^16.3.1",
"bcryptjs": "^2.4.3",
"express-session": "^1.17.3",
"express-rate-limit": "^7.1.5",
"mysql2": "^3.6.5",
"helmet": "^7.1.0",
"csv-parser": "^3.0.0",
"json2csv": "^6.0.0-alpha.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.2.1",
"vite": "^5.0.8",
"concurrently": "^8.2.2",
"tailwindcss": "^3.4.0",
"postcss": "^8.4.32",
"autoprefixer": "^10.4.16"
}
}