mirror of
https://gitcode.com/JianFeeeee/TrulyMEM-TrueHumanMEM.git
synced 2026-09-20 08:58:15 +00:00
feat: web login system, auto-load history, config extraction
- Add Flask session-based authentication (username/password login) - Auto-load chat history from backend on page load - Extract SECRET_KEY and user credentials to web_config.json - Create web_config.example.json as template - Add web_config.json to .gitignore (sensitive info) - Update docs: architecture, API reference, quick start guides
This commit is contained in:
@ -505,4 +505,25 @@ Common errors:
|
||||
|--------------|-------------|
|
||||
| `API Key not configured` | API Key not set |
|
||||
| `timeout` | Request timeout |
|
||||
| `Tool call rejected: ...` | Tool call rate exceeded limit |
|
||||
| `Tool call rejected: ...` | Tool call rate exceeded limit |
|
||||
|
||||
## Web API Endpoints
|
||||
|
||||
| Method | Path | Description |
|
||||
|--------|------|-------------|
|
||||
| GET | /api/check-auth | Check if current session is authenticated |
|
||||
| POST | /api/login | Login (JSON body: username, password) |
|
||||
| POST | /api/logout | Logout |
|
||||
| GET | /api/history | Get chat history |
|
||||
| POST | /api/message | Send message to AI |
|
||||
| POST | /api/tools/execute | Execute tool call |
|
||||
| GET | /api/status | Get system status |
|
||||
| GET | /api/settings | Get settings |
|
||||
| PUT | /api/settings | Update settings |
|
||||
| DELETE | /api/history | Clear history |
|
||||
| POST | /api/shutdown | Shutdown server |
|
||||
| GET | /api/activity | Get database operation records |
|
||||
| GET | /api/graph | Get knowledge graph data |
|
||||
| GET | /api/graph/highlight | Get highlighted nodes |
|
||||
|
||||
All API endpoints (except /api/login and /api/check-auth) require authentication. Login uses Flask sessions with 7-day validity.
|
||||
Reference in New Issue
Block a user