Pipeline API and orchestration¶
The Pipeline is the service-to-service HTTP boundary called by the Handler. Its Azure Function route is pipeline-fn; with the default Azure Functions route prefix, the direct-host path is /api/pipeline-fn. The configured PIPELINE_ENDPOINT must contain the complete URL (the code also accepts the TDM_ENDPOINT fallback). A reverse proxy may expose another path. 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, NDG, and VOG HTTP 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. NLG is different: Pipeline invokes Tala's authored NLG realization in-process, not through a FUNCTION_ENDPOINT_NLG. See pipeline/endpoints.py in the Pipeline repository for the complete current HTTP endpoint list.
The Pipeline version documented here fills missing neural settings and model selectors from deployment settings/defaults, but existing truthy session values take precedence. Resolved values therefore persist across turns and can outlive a deployment configuration change. The Handler's non_neural query parameter only sets session.neural=false when that field is absent; it does not override an existing or offer-supplied value. Non-neural mode also does not guarantee that no NDG HTTP request is made. Verify actual feature flags and downstream behavior against the deployed revisions.
The defaults in that Pipeline version for session.neural_settings are:
| Setting | Default |
|---|---|
move_ndu | true |
asr_ndu | true |
word_lookup_ndg | true |
background_qna_ndg | true |
limited_gpt_qna_ndg | true |
generate_rb_q_feedback_ndg | true |
select_comments_neurally | false |
For neural turns, model selectors use an existing truthy session value first, then the deployment setting, then the code default. Its deployment settings include GPT_MODEL_NDU, GPT_MODEL_FULLTEXT_NDU, GPT_MODEL_ASR_NDU, GPT_MODEL_NDG, GPT_MODEL_NDG_NON_STREAMING, and NDG_AZURE_OPENAI_RESOURCE. The resolved values appear in session fields model_name_ndu, model_name_fulltext_ndu, model_name_asr_ndu, model_name_ndg_non_streaming, and model_ndg.{deployment,azure_openai_resource}. Defaults and available deployment names are revision- and environment-specific.
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. In the Handler/Pipeline/TDM versions cited in Architecture, Handler action/validator result keys do not match TDM's request schema, and Handler's continuation does not add the event marker Pipeline uses to recognize service results. Verify these revisions as a coordinated set before relying on action/validator continuation. Do not treat every Pipeline response as a completed turn.
Errors and deployment boundary¶
The Azure Function entry point returns Pipeline response JSON on success. Recognized invalid dialogue domains return HTTP 400; 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.