Commit Graph

2 Commits

Author SHA1 Message Date
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
MerCry 0a167d69f0 feat(ai-service): implement LLM Adapter for T3.1 [AC-AISVC-02, AC-AISVC-06]
- Add LLMClient abstract base class with generate/stream_generate interfaces
- Implement OpenAIClient with httpx for OpenAI-compatible API calls
- Add retry logic with tenacity for timeout handling
- Support both non-streaming and streaming generation
- Add comprehensive unit tests for LLM Adapter
- Fix entities.py JSON column type for SQLModel compatibility
2026-02-24 13:19:38 +08:00