ai-robot-core/ai-service
MerCry 550d0d8498 feat(ai-service): implement context merging for T3.2 [AC-AISVC-14, AC-AISVC-15]
- Add ContextMerger class for combining local and external history
- Implement message fingerprint computation (SHA256 hash)
- Implement deduplication: local history takes priority
- Implement token-based truncation using tiktoken
- Add comprehensive unit tests (20 test cases)
2026-02-24 13:26:37 +08:00
..
app feat(ai-service): implement context merging for T3.2 [AC-AISVC-14, AC-AISVC-15] 2026-02-24 13:26:37 +08:00
tests feat(ai-service): implement context merging for T3.2 [AC-AISVC-14, AC-AISVC-15] 2026-02-24 13:26:37 +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