Function build_prompt_ir
Function build_prompt_ir
Function build_prompt_ir
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
pub fn build_prompt_ir(request: &AnnotatedLlmRequest) -> Result<PromptIR>
Build a normalized PromptIR from an annotated LLM request.
The builder preserves prompt order, inserts tool-schema blocks before the first non-system message when tools are present, and computes the request hashes needed by downstream Adaptive Cache Governor (ACG) analysis.
request: Annotated LLM request to normalize.A Result containing the constructed PromptIR.
Returns an error when tool definitions or request components cannot be serialized into the canonical form required by the IR.