Implement Ollama integration service for AI-based speaker detection

- Created OllamaService class with httpx for API communication
- Implemented detect_speakers() method with structured prompts
- Added JSON response parser supporting multiple formats
- Implemented is_available() health check method
- Added 30-second timeout handling
- Configured OLLAMA_BASE_URL environment variable
- Added comprehensive unit tests with 100% coverage
- Updated requirements.txt with httpx dependency

Requirements: 14.1, 14.2, 14.3, 14.6
This commit is contained in:
2025-12-09 10:35:30 +00:00
parent 20e6cd1f9d
commit a8802fd765
5 changed files with 349 additions and 1 deletions

View File

@@ -289,7 +289,7 @@
- Include troubleshooting section
- _Requirements: 13.1, 13.2, 13.3, 13.4, 13.5_
- [ ] 15. Implement Ollama integration service
- [x] 15. Implement Ollama integration service
- Create OllamaService class in services/ollama_service.py
- Implement connection to Ollama API using httpx
- Configure OLLAMA_BASE_URL environment variable (default: http://localhost:11434)