Communication: hbf-nlp
1-hop view of how this service communicates with its siblings. For the full system view, see service-communication.md.
Calls Out To
| Service | Protocol | Purpose | Key calls / queues |
|---|---|---|---|
| hbf-core | HTTP (hbf-core-api + direct) | Session, tenant, KB, pipeline management | ChatSessionsClient.findById/update(), TenantsClient.findById(), KnowledgeBaseClient.list(), KnowledgeBaseArticleClient.findAllByKnowledgeBase(), GET /nlp-pipelines/{pipelineId}, GET /activities/training-content, POST/PATCH test set runs, PATCH pipeline |
| helvia-rag-pipelines | HTTP POST | RAG processing, search, corpus, training | /pipelines/{id}:process, :search, /corpus (PUT), :train -- Bearer auth per pipeline |
| hbf-notifications | HTTP POST | Training notifications (optional) | /organizations/{orgId}/notifications/ |
| Dialogflow | gRPC (@google-cloud/dialogflow SDK) | Intent detection | SDK method calls |
| Google Gemini | HTTP (@google/genai SDK) | LLM completions | SDK method calls |
| OpenAI | HTTP (openai SDK) | LLM completions, embeddings | SDK method calls |
| Azure OpenAI | HTTP (custom client) | LLM completions, embeddings | Custom HTTP calls |
| MySQL | TCP (TypeORM) | Message metadata persistence | MessageMetadata entity |
| Redis | TCP (keyv/redis) | Optional cache | Key-value cache (optional) |
Called By
| Service | Protocol | How |
|---|---|---|
| hbf-bot | HTTP POST | /tenants/{tenantId}/process (Bearer token) |
| hbf-console | HTTP POST | /organizations/{orgId}/tenants/{tenantId}/process |
Contracts
Inbound
POST /organizations/:orgId/tenants/:tenantId/process-- process message (console)POST /organizations/:orgId/tenants/:tenantId/nlp-pipelines/:pipelineId/process-- process with specific pipelinePOST /tenants/:tenantId/process-- process message (moderator/bot)POST /organizations/:orgId/tenants/:tenantId/train-- train all pipelinesPOST /organizations/:orgId/tenants/:tenantId/nlp-pipelines/:pipelineId/train-- train specific pipelinePOST /organizations/:orgId/tenants/:tenantId/sessions/:sessionId/analyze-- LLM session summaryPOST /llm-request-- direct LLM completion (bot only)POST /detect-language-- language detection (bot only)
Outbound
- hbf-core: Multiple REST calls via hbf-core-api + direct HTTP (see "Calls Out To")
- helvia-rag-pipelines:
POST /pipelines/{id}:process,:search,PUT /pipelines/{id}/corpus,POST /pipelines/{id}:train-- Bearer auth - hbf-notifications:
POST /organizations/{orgId}/notifications/(optional, for training status) - LLM providers: Dialogflow, Gemini, OpenAI, Azure OpenAI per pipeline configuration
Environment Variables
| Variable | Target |
|---|---|
HBF_CORE_URL | hbf-core |
NOTIFICATIONS_SERVICE_URL | hbf-notifications |
TYPEORM_* | MySQL |
CACHE_REDIS_* | Redis |