Expand description
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§
- LlmJson
Stream - Stream of JSON chunks produced by the managed streaming LLM pipeline.
- LlmSanitize
Request Context - Per-call codec context for LLM request sanitize guardrails.
- LlmSanitize
Response Context - Per-call codec context for LLM response sanitize guardrails.
Enums§
- Builtin
LlmCodec - Relay’s built-in LLM codec identities.
- LlmCodec
Identity - Per-call LLM codec identity supplied to sanitize guardrails.
Traits§
- LlmStream
Inner - Internal close-aware stream implementation.
Type Aliases§
- Event
Sanitize Fn - Sanitize mutable observability fields on a fully constructed event.
- Event
Subscriber Fn - Consume runtime lifecycle events after they are emitted.
- LlmCollector
Fn - Per-chunk collector used by the streaming LLM runtime.
- LlmConditional
Fn - Decide whether an LLM call is allowed to continue.
- LlmExecution
Fn - Wrap or replace non-streaming LLM execution.
- LlmExecution
Next Fn - Continuation type invoked by non-streaming LLM execution intercepts.
- LlmFinalizer
Fn - Finalizer used to synthesize the aggregate streaming response payload.
- LlmRequest
Intercept Fn - Rewrite or annotate an LLM request before execution.
- LlmSanitize
Request Fn - Sanitize an LLM request before the runtime records it.
- LlmSanitize
Response Fn - Sanitize an LLM response before the runtime records it.
- LlmStream
Execution Fn - Wrap or replace streaming LLM execution.
- LlmStream
Execution Next Fn - Continuation type invoked by streaming LLM execution intercepts.
- Tool
Conditional Fn - Decide whether a tool call is allowed to continue.
- Tool
Execution Fn - Wrap or replace tool execution.
- Tool
Execution Next Fn - Continuation type invoked by tool execution intercepts.
- Tool
Intercept Fn - Rewrite tool arguments before execution.
- Tool
Sanitize Fn - Sanitize a tool request payload before the runtime records it.