Module callbacks
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.
Callback type aliases used by the runtime middleware pipeline.
The public middleware registration APIs accept callback closures with the signatures defined in this module. These aliases centralize those signatures so the runtime can compose tool and LLM middleware consistently across bindings.
Structs
- LlmJsonStream: Stream of JSON chunks produced by the managed streaming LLM pipeline.
- LlmSanitizeRequestContext: Per-call codec context for LLM request sanitize guardrails.
- LlmSanitizeResponseContext: Per-call codec context for LLM response sanitize guardrails.
Enums
- BuiltinLlmCodec: Relay’s built-in LLM codec identities.
- LlmCodecIdentity: Per-call LLM codec identity supplied to sanitizer and SDK callbacks.
Traits
- LlmStreamInner: Internal close-aware stream implementation.
Type Aliases
- EventSanitizeFn: Sanitize mutable observability fields on a fully constructed event.
- EventSubscriberFn: Consume runtime lifecycle events after they are emitted.
- LlmCollectorFn: Per-chunk collector used by the streaming LLM runtime.
- LlmConditionalFn: Decide whether an LLM call is allowed to continue.
- LlmExecutionFn: Wrap or replace non-streaming LLM execution.
- LlmExecutionNextFn: Continuation type invoked by non-streaming LLM execution intercepts.
- LlmFinalizerFn: Finalizer used to synthesize the aggregate streaming response payload.
- LlmRequestInterceptFn: Rewrite or annotate an LLM request before execution.
- LlmSanitizeRequestFn: Sanitize an LLM request before the runtime records it.
- LlmSanitizeResponseFn: Sanitize an LLM response before the runtime records it.
- LlmStreamExecutionFn: Wrap or replace streaming LLM execution.
- LlmStreamExecutionNextFn: Continuation type invoked by streaming LLM execution intercepts.
- ToolConditionalFn: Decide whether a tool call is allowed to continue.
- ToolExecutionFn: Wrap or replace tool execution.
- ToolExecutionNextFn: Continuation type invoked by tool execution intercepts.
- ToolInterceptFn: Rewrite tool arguments before execution.
- ToolSanitizeFn: Sanitize a tool request payload before the runtime records it.