Function llm_conditional_execution
Function llm_conditional_execution
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.
pub fn llm_conditional_execution(request: &LlmRequest) -> Result<()>
Run only the LLM conditional-execution guardrail chain.
This evaluates whether an LLM call should be allowed to proceed without invoking request intercepts or execution. Each evaluated guardrail emits an automatic guardrail scope start/end pair for observability.
Parameters
request: RawLlmRequestto validate.
Returns
A Result that is Ok(()) when all guardrails allow execution.
Errors
Returns FlowError::GuardrailRejected when a guardrail blocks execution, or any error raised by the guardrail chain itself.
Notes
This helper is useful for preflight checks when the caller needs the rejection result without starting an LLM span. Guardrail scopes are still emitted for the conditional checks themselves.