AI Service¶
Overview¶
AKKO AI Service is a FastAPI application that provides OpenAI-compatible REST endpoints for SQL-integrated AI functions. It acts as the bridge between Trino's native ai_*() functions and the LLM backend (Ollama/LiteLLM).
Architecture¶
Endpoints¶
| Endpoint | Method | Description |
|---|---|---|
/v1/analyze_sentiment |
GET/POST | Sentiment analysis |
/v1/classify |
GET/POST | Text classification |
/v1/summarize |
GET/POST | Text summarization |
/v1/translate |
GET/POST | Translation |
/v1/extract_entities |
GET/POST | Named entity recognition |
/v1/redact_pii |
GET/POST | PII masking (GDPR) |
/v1/classify_sensitivity |
GET/POST | Data sensitivity classification |
/v1/detect_language |
GET/POST | Language detection |
/v1/extract_keywords |
GET/POST | Keyword extraction |
/v1/embed |
GET | Vector embedding (768-dim) |
/v1/trino-audit |
POST | Trino query audit receiver |
/v1/minio-audit |
POST | object storage access audit receiver |
/health |
GET | Health check |
/metrics |
GET | Prometheus metrics |
Configuration¶
| Variable | Default | Description |
|---|---|---|
LLM_URL |
http://akko-akko-litellm:4000 |
LLM backend URL |
AKKO_AI_SERVICE_TOKEN |
(empty) | Service account token |
OLLAMA_HOST |
http://akko-akko-ollama:11434 |
Ollama direct URL |
Custom Image¶
akko-ai-service:2026.03 -- FastAPI + audit endpoints (docker/ai-service/Dockerfile)
License¶
Apache 2.0