API
Interne PHP-Services und REST-Endpunkte für KI-Integration.
Unterkapitel
Chat API
RAG-Chat mit Vektorsuche und LLM-Integration
Tasks API
Task-Management, Zuweisungen, KI-Ausführung
Content API
Content-Aufträge erstellen und bearbeiten
Explorer API
Dokumente, Chunks, Taxonomie, Suche
Services
OllamaService, QdrantService, ClaudeService
Architektur
Vollständig in PHP implementiert (Migration von Python zu nativen Services abgeschlossen):
Browser (HTMX/JS)
↓
PHP Controller (/src/Controller/)
↓
PHP Services (/src/Infrastructure/AI/)
├── AIConfig.php (Config & Factory)
├── ChatService.php (RAG-Orchestrator)
├── OllamaService.php (Embeddings)
├── QdrantService.php (Vektorsuche)
└── ClaudeService.php (LLM)
↓
┌─────────────┬─────────────┬─────────────┐
│ Ollama API │ Qdrant API │ Claude API │
│ :11434 │ :6333 │ anthropic │
└─────────────┴─────────────┴─────────────┘
Endpunkte-Übersicht
Chat API
| Methode | Pfad | Beschreibung |
|---|---|---|
| POST | /api/v1/chat | Chat-Nachricht senden |
| GET | /api/v1/chat/search | Vektorsuche |
| GET | /api/v1/chat/stats | Statistiken |
Tasks API
| Methode | Pfad | Beschreibung |
|---|---|---|
| GET/POST | /api/v1/tasks | Tasks auflisten/erstellen |
| GET/PUT/DELETE | /api/v1/tasks/{id} | Task-Details/Update/Löschen |
| POST | /api/v1/tasks/{id}/execute | KI-Ausführung |
Content API
| Methode | Pfad | Beschreibung |
|---|---|---|
| PUT | /api/v1/content/{id} | Auftrag aktualisieren |
Explorer API
| Methode | Pfad | Beschreibung |
|---|---|---|
| GET | /api/v1/explorer/stats | Statistiken |
| GET | /api/v1/explorer/dokumente | Dokumente-Liste |
| GET | /api/v1/explorer/seiten | Seiten-Liste |
| GET | /api/v1/explorer/chunks | Chunks-Liste |
| GET | /api/v1/explorer/taxonomie | Taxonomie |
| GET | /api/v1/explorer/entities | Entities |
| POST | /api/v1/explorer/suche | Hybrid-Suche |
Services
| Service | Pfad | Funktion |
|---|---|---|
| AIConfig | /src/Infrastructure/AI/AIConfig.php | Config & Factory |
| ChatService | /src/Infrastructure/AI/ChatService.php | RAG-Orchestrator |
| OllamaService | /src/Infrastructure/AI/OllamaService.php | Embeddings & LLM |
| QdrantService | /src/Infrastructure/AI/QdrantService.php | Vektorsuche |
| ClaudeService | /src/Infrastructure/AI/ClaudeService.php | LLM-Antworten |
Unterseiten
- Chat-API - RAG-basierter Chat mit Vektorsuche und LLM-Integration. Verwendet lokale Embeddings (Ollama), Vektorsuche (Qdrant) und Claude (Anthropic) oder Ollama als LLM.
- Content-API - REST-API für das Content Studio.
- Tasks API - REST-API für Task-Management mit KI-Ausführung
- AI-Services - PHP-Service-Klassen für KI-Integration. Native HTTP-Clients für Ollama, Qdrant und Claude API.
- Explorer API - REST-API für Dokumentations-Exploration mit Chunks, Taxonomie und Suche