nemo-relay
Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -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.
The public Rust SDK for NeMo Relay.
Instrument through scope, tool, and llm, register middleware through registry, and observe events through subscriber or exporter. Shared request, response, error, and codec contracts are re-exported directly. Bindings and component implementations use their owning crates and the execution engine in nemo-relay-runtime instead of depending on this SDK.
Re-exports
pub use nemo_relay_logging as logging;
Modules
- codec: Normalized LLM request and response data types. Shared normalized LLM request and response data types.
- config_editor: Typed configuration editor metadata. Typed configuration editor metadata.
- context: Task, thread, and distributed request context propagation. Opaque scope ownership and propagation across tasks and threads.
- diagnostics: Diagnostic collection, configuration, inspection, and shared evidence contracts. Diagnostic ownership, collection, and inspection for Rust applications.
- error: Shared errors returned by the runtime and first-party components. Error types for the NeMo Relay runtime.
- event: Canonical lifecycle events and normalized LLM accessors.
- exporter: Runtime-bound exporter constructors and their configuration contracts.
- llm: Managed and manual LLM calls.
- middleware: Shared middleware callback, stream, and invocation-context contracts.
- optimization: Adaptive contribution recording for Rust integrations. Plugin-neutral evidence recording for managed LLM calls. Managed, bounded LLM optimization accounting.
- plugin: Plugin contracts, configuration, and activation.
- registry: Global and scope-local middleware registration.
- resource_metrics: Structured resource measurements and on-demand collection.
- scope: Scope lifecycle and event emission.
- subscriber: Lifecycle event subscriptions and delivery barriers.
- tool: Managed and manual tool calls.
Macros
- editor_config: Implements
EditorConfigfor a configuration type.
Structs
- AnnotatedLlmRequest: Structured view of an LLM request, produced by a Codec from opaque
LlmRequestcontent. - AnnotatedLlmResponse: Structured view of an LLM response, produced by a response codec from raw JSON API output.
- ExecutionOptions: Stage options for managed calls. Choose which middleware stages run for one managed call.
- LlmRequest: JSON-shaped LLM request payload passed through the runtime.
- Usage: Token usage statistics from an LLM API response.
Enums
- Event: Tagged union covering the two ATOF event kinds emitted by the runtime.
- FlowError: The error type for all NeMo Relay runtime operations.
- NormalizedStreamEvent: Provider-neutral incremental stream item used by cross-protocol transcoders.
Traits
- LlmCodec: A bidirectional translator between opaque
LlmRequestcontent and structuredAnnotatedLlmRequest. - LlmNormalizer: Best-effort request and response normalization for observability projections.
- LlmResponseCodec: Decode-only codec for LLM API responses.
- StreamingCodec: Per-provider streaming codec used with the runtime streaming execution API.
Functions
- initialize_runtime: Install default services without activating configured plugins.
Type Aliases
- Json: Type alias for
serde_json::Value, used as the universal JSON representation throughout NeMo Relay APIs. - Result: A specialized
Resulttype for NeMo Relay operations.