Pipeline API and orchestration¶
The Pipeline is the service-to-service HTTP boundary called by the Handler. Its Azure Function route is pipeline-fn. The request body uses the same versioned interaction envelope that the Handler receives; the Pipeline adds and propagates a request ID and prepares the session before processing.
Processing sequence¶
At a high level, the current implementation:
- Prepares the session and neural settings.
- Starts interpretation and dialogue processing.
- May correct the leading speech hypothesis through ASR/NDU and restart interpretation if the correction changes the utterance.
- Ensures the final interpretation and dialogue are present in the response.
- Enriches the DME output and trims dialogue history.
Individual NLU, NDU, DME, NLG, NDG, and VOG calls are conditional. Their endpoints are configured through FUNCTION_ENDPOINT_* application settings; for example, FUNCTION_ENDPOINT_DM, FUNCTION_ENDPOINT_NLU, FUNCTION_ENDPOINT_NDU, FUNCTION_ENDPOINT_NDG, and FUNCTION_ENDPOINT_VOG. Optional paths include ASR-NDU, AB-NDU, Q&A NDG, and system NDG. See pipeline/endpoints.py in the Pipeline repository for the complete current endpoint list.
Request and response responsibilities¶
The Pipeline consumes JSON and returns a JSON response. Its internal PipelineRequest and PipelineResponse wrappers normalize access to the request, session, response, and request ID; they are implementation details, not separate wire formats.
Some responses represent an outstanding service invocation and do not yet contain output. The Handler owns the HTTP service round-trip and resubmits the result to the Pipeline. Do not treat every Pipeline response as a completed turn.
Errors and deployment boundary¶
The Azure Function entry point returns the Pipeline response JSON on success. Unhandled exceptions are logged and returned as an HTTP 500 error object.
This endpoint is an internal production interface called by the Handler. Its presence in the codebase does not make it a supported standalone customer API. Coordinate wire-format changes across the Handler and Pipeline and validate them with their request/response tests.