ai-robot-core/ai-service
MerCry 6d54030e0d feat(ai-service): implement complete Orchestrator generation pipeline for T3.4 [AC-AISVC-01, AC-AISVC-02]
- Integrate Memory, ContextMerger, Retriever, LLMClient, ConfidenceCalculator
- Implement 8-step generation pipeline:
  1. Load local history from Memory
  2. Merge with external history (dedup + truncate)
  3. RAG retrieval (optional)
  4. Build prompt with context and evidence
  5. LLM generation
  6. Calculate confidence
  7. Save messages to Memory
  8. Return ChatResponse
- Add GenerationContext dataclass for tracking intermediate results
- Implement fallback response mechanism for error handling
- Add 21 unit tests for OrchestratorService
- All 138 tests passing
2026-02-24 13:47:12 +08:00
..
app feat(ai-service): implement complete Orchestrator generation pipeline for T3.4 [AC-AISVC-01, AC-AISVC-02] 2026-02-24 13:47:12 +08:00
tests feat(ai-service): implement complete Orchestrator generation pipeline for T3.4 [AC-AISVC-01, AC-AISVC-02] 2026-02-24 13:47:12 +08:00
README.md feat(ai-service): implement LLM Adapter for T3.1 [AC-AISVC-02, AC-AISVC-06] 2026-02-24 13:19:38 +08:00
pyproject.toml feat(ai-service): implement LLM Adapter for T3.1 [AC-AISVC-02, AC-AISVC-06] 2026-02-24 13:19:38 +08:00

README.md

AI Service

Python AI Service for intelligent chat with RAG support.

Features

  • Multi-tenant isolation via X-Tenant-Id header
  • SSE streaming support via Accept: text/event-stream
  • RAG-powered responses with confidence scoring

Installation

pip install -e ".[dev]"

Running

uvicorn app.main:app --host 0.0.0.0 --port 8080

API Endpoints

  • POST /ai/chat - Generate AI reply
  • GET /ai/health - Health check