Skip to main content

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

ServiceProtocolPurposeKey calls / queues
hbf-coreHTTP (hbf-core-api + direct)Session, tenant, KB, pipeline managementChatSessionsClient.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-pipelinesHTTP POSTRAG processing, search, corpus, training/pipelines/{id}:process, :search, /corpus (PUT), :train -- Bearer auth per pipeline
hbf-notificationsHTTP POSTTraining notifications (optional)/organizations/{orgId}/notifications/
DialogflowgRPC (@google-cloud/dialogflow SDK)Intent detectionSDK method calls
Google GeminiHTTP (@google/genai SDK)LLM completionsSDK method calls
OpenAIHTTP (openai SDK)LLM completions, embeddingsSDK method calls
Azure OpenAIHTTP (custom client)LLM completions, embeddingsCustom HTTP calls
MySQLTCP (TypeORM)Message metadata persistenceMessageMetadata entity
RedisTCP (keyv/redis)Optional cacheKey-value cache (optional)

Called By

ServiceProtocolHow
hbf-botHTTP POST/tenants/{tenantId}/process (Bearer token)
hbf-consoleHTTP 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 pipeline
  • POST /tenants/:tenantId/process -- process message (moderator/bot)
  • POST /organizations/:orgId/tenants/:tenantId/train -- train all pipelines
  • POST /organizations/:orgId/tenants/:tenantId/nlp-pipelines/:pipelineId/train -- train specific pipeline
  • POST /organizations/:orgId/tenants/:tenantId/sessions/:sessionId/analyze -- LLM session summary
  • POST /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

VariableTarget
HBF_CORE_URLhbf-core
NOTIFICATIONS_SERVICE_URLhbf-notifications
TYPEORM_*MySQL
CACHE_REDIS_*Redis

Flows Involving This Service